okkur / syna

Highly customizable open source theme for Hugo based static websites
https://syna.okkur.org/demo/
Apache License 2.0
250 stars 133 forks source link

Honor "disabled" on subitems. #829

Closed c-mauderer closed 3 years ago

c-mauderer commented 3 years ago

What this PR does / why we need it:

This allows to disable subitems for example in the portfolio by setting disabled = true just like on other pages.

Special notes for your reviewer:

None.

Release note:

Honor "disabled" on subitems.
stp-ip commented 3 years ago

One small thing missing, that would be a nice to have would be a change to the docs or example code within exampleSite, which the docs page uses. Other fragments have a commented "disabled" line in the example config.

c-mauderer commented 3 years ago

One small thing missing, that would be a nice to have would be a change to the docs or example code within exampleSite, which the docs page uses. Other fragments have a commented "disabled" line in the example config.

I'll add that. I hope that I find all locations where the subitems are used.

c-mauderer commented 3 years ago

I noted that on the current version of the documentation a lot of the "code (subitem)" isn't really readable. It seems that the formatting isn't detected correctly. Reason seems to be that there is a blank line missing. For example for FAQ the following patch would fix that:

diff --git a/exampleSite/content/fragments/faq/code-faq.md b/exampleSite/content/fragments/faq/code-faq.md
index 27463521..2272b69f 100644
--- a/exampleSite/content/fragments/faq/code-faq.md
+++ b/exampleSite/content/fragments/faq/code-faq.md
@@ -17,6 +17,7 @@ background = "secondary"

 <details>
 <summary>Code (subitem)</summary>
+

+++ title = "How to sit on the laptop?"



Should I add a patch here or would you prefer an extra Pull Request for that?
stp-ip commented 3 years ago

Noticed this as well and put it on my offline notes, but happy to have this fixed. Ok to have this within this PR as a separate commit.

stp-ip commented 3 years ago

Will merge this in the coming days, if Mahdi doesn't respond/merge.

c-mauderer commented 3 years ago

Will merge this in the coming days, if Mahdi doesn't respond/merge.

Thank you.

stp-ip commented 3 years ago

Thanks again and looking forward to more contributions :)