Closed dougforpres closed 1 year ago
Thanks, I'm glad you like the theme!
The snippet you mentioned is from the Hugo docs.
To list the most relevant pages on the front page or similar, you should use the
site.Params.mainSections
list instead of comparing section names to hard-coded values like"posts"
or"post"
.{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
If the user has not set this configuration parameter in their site configuration, it will default to the section with the most pages.
The user can override the default:
[params] mainSections = ['blog', 'docs']
So I think you need to redefine the mainSections
variable. The same snippet is used for the index page:
Let me know if that helps!
Awesome, thank you - I updated the config and it works great.
Hi, I just ported my small blog/site from Wordpress to a github site using hugo/gruvbox.
Firstly, very cool - I like it a lot!
My question related to the search option - it only seems to search/index blog/post items. Ideally I'd like it to search all my content.
I checked your personal site and it seems to behave the same.
Wondering if this line of code is pointing to some config that can be added/tweaked to add extra sections to index? https://github.com/schnerring/hugo-theme-gruvbox/blob/4a4180acb46a27f1a6584af760fefde54b868edd/assets/js/flexsearch.js#L70
Thanks again - your theme is awesome.