Is there a way to set frontmatter property for every list in the project? #121
Unanswered
MikiVanousek
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Thanks for the question. I may not be fully understanding your end objective here but a useful feature of Hugo that may help is the special You can essentially do something like this in your ---
title: "Categories"
cascade:
showDate: false
showDateUpdated: false
--- The example site in the theme uses this method in content/samples/_index.md if you want to see a working example. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to have my posts separated into several categories, each post belonging to one and only one category. I reconned the best way to do this is to create subfolders and list in each sub folder.
So far I made only one category
foss
. This is my content folder structure:This means, that when I open the posts list, I see a list of category lists. Each category is a list of posts.
I want each post to display the date it was made and updated.
But, if the list item is not a blog post, but a category, I want the dates to be hidden.
I now set this in the category front matter.
But this means I need to set it for each new category (and potentially subcategory in the future) I create. I tried setting these in the
[list]
config, but it did not take effect. Is there a way to change this globally? If you are not a post, but a list, do not show your date!Beta Was this translation helpful? Give feedback.
All reactions