Change search to be portable #125
teamcrisis
started this conversation in
Ideas
Replies: 2 comments
-
Thanks for the sample code @teamcrisis - I agree this would be really useful. I'm using doks as a site for my personal projects, so also added that as a custom archetype and needed to search across it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Should search be changed to use portable
where
?https://gohugo.io/functions/where/#mainsections
I was trying to index more than just the docs section. Changing to
portable
would allow the user to specify which sections they would want indexed within theconfig
.Updating:
https://github.com/h-enk/doks/blob/master/assets/js/index.js#L86
To:
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
Then adding this to
config.toml
:Beta Was this translation helpful? Give feedback.
All reactions