Closed McShelby closed 1 month ago
- [ ] deprecate hidden pages feature? would make menu generation much faster #685
while i understand hidden pages could make menu generation more complex, removing hidden pages seems to be a major step backwards in my use case and would potentially force me to switch to another theme.
I am also not happy with this. This would also affect the use case at my company, so I doubt that I will implement it in that radical way. One other thought is to make it opt-in and explicitly mention the performance impact. I need to do further tests to decide on this.
I am also not happy with this. This would also affect the use case at my company, so I doubt that I will implement it in that radical way. One other thought is to make it opt-in and explicitly mention the performance impact. I need to do further tests to decide on this.
i'm kinda intrigued with the way folks over at mdbook are handling this: they use a separate file named "summary.md" to construct the menu. such a file could be easily provided manually or even constructed automatically in case one needs hidden pages. but that's not really the path of hugo ...
Sounds intersting. Do you have a link to the docs? My quick google-fu was not successful.
Sounds intersting. Do you have a link to the docs? My quick google-fu was not successful.
https://rust-lang.github.io/mdBook/guide/creating.html, https://github.com/rust-lang/mdBook
hmmm, the "summary.md" seems also to be used as kind of toc and/or start page. but the structure and the linked documents is used to create the menu.
Thanks @cagix. To me this sounds like a page is hidden if it is not contained in any summary. Probably the page is still accessible by direct linking. But this would mean the page is also not part of the book hierarchy which would be different from the themes hidden page feature. Or do i miss a part?
Thanks @cagix. To me this sounds like a page is hidden if it is not contained in any summary. Probably the page is still accessible by direct linking. But this would mean the page is also not part of the book hierarchy which would be different from the themes hidden page feature. Or do i miss a part?
indeed, it seems to work this way. but perhaps the idea could be adapted: hugo usually renders all pages contained in a certain folder and uses the structure and names or weights to populate the menu. now, to implement hidden pages, we could derive the menu in this case from something like a "summary.md", so only items defined in this file will show up in the menu - but hugo will render all pages as usual, which will "hide" all pages, which are not being referenced in the summary ...
Notice: The code will be restructured heavily in #891 coming in 7.0.0. If you have overloaded partials or having own output formats defined, you will most likely be affected by this. See further information in the ticket notes or release notes, once available.
The release of 7.0.0, tackeling most of the harder issues is right around the corner. I expect it to be released this month. Hopefully I'll meet an october deadline ;-)
Announcement: 7.0.0 will swap its main font. See #922
Feel free to get an early look at 7.0.0 in the public branch at https://github.com/McShelby/hugo-theme-relearn/tree/7.0.0
While the release is feature complete, the docs are still in flux, yet.
Feedback is welcome.
It's done. Watch the world burn.
Due to broken changes in the generation of the changelog, I had to manually fix them. Now the list of fixed features is complete
This is a list of ideas running thru my head to make the theme more compliant with standard Hugo features. This does not necessarily mean, that these changes finally will happen:
output-partial
mechanism by reverting back to standard partial callsbaseof
templatesmaybe add more layouts (landing page without menu, gallery, etc?)postponedswitch the main menu generation to standard Hugo menu feature for more flexibility of what to include in the linkspostponedthis will most likely outsource the docs to a different repowontchangeput all theme config option underwontchange[params.relearn]
forhugo.toml
and probably frontmatter - Hugo is thinking into a similar direction of getting more structure into the params (there it's motivated by having clean interfaces for the underlying object structures and not hassle around with volatile object properties)leverage Hugo'swontchange_cascade
feature to inherit settings in hierachical structures; this will affect the menu optionshidden
,alwaysopen
,ordersectionby
andcollapsibleMenu