Document site.Params.mainSections usage #1082

Aditya Telange 2022-11-12 13:20:43 +05:30
parent 24cad527b1
commit cc13d25ff4

18
FAQs.md

@ -11,6 +11,7 @@
- [Adding Custom Favicon(s)](#adding-custom-favicons) - [Adding Custom Favicon(s)](#adding-custom-favicons)
- [Centering image in markdown](#centering-image-in-markdown) - [Centering image in markdown](#centering-image-in-markdown)
- [Using Hugo's Syntax highlighter "chroma"](#using-hugos-syntax-highlighter-chroma) - [Using Hugo's Syntax highlighter "chroma"](#using-hugos-syntax-highlighter-chroma)
- [Posts from only one folder/section visible on home page?](#posts-from-only-one-foldersection-visible-on-home-page)
- [References](#references) - [References](#references)
--- ---
@ -316,6 +317,23 @@ xhr.open("GET", "https://example.com/index.json");
--- ---
## Posts from only one folder/section visible on home page
That is because PaperMod uses `mainsections` from Hugo.
Read more: https://gohugo.io/functions/where/#mainsections
If you have not set this config parameter in site config, it will default to the section with the most pages.
You can customize it with:
```yml
params:
mainSections:
- blog
- docs
```
---
## References ## References
- [Override a Hugo theme](https://zwbetz.com/override-a-hugo-theme/) - [Override a Hugo theme](https://zwbetz.com/override-a-hugo-theme/)