Apply a frontmatter property to all files in folder

└── content
    ├── pages
    │   ├──
    │   ├──
    │   └──

Inside each,,, they all have menu: main in the frontmatter.

Is there a way for hugo to regard any file in pages/ to have menu: main automatically? instead of having to add this property file by file.

You can cascade the menu, but the menu values will appear alphabetically. Add this to /pages/ front matter.

  menu: main

Thank you.

And of course, to change alphabetic order, it’s enough to use weight field in frontmatter of every individual file.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.