-
Hi, as per default Hugo specs, I was expecting that the page kind However, I discovered that any file renders to a kind of 'page'. I have these files in my content folder:
When I use the custom footer to show the layouts/partials/extend-footer.html:
As per the Hugo docs, I was expecting the about page to show 'page' and hello world to show 'posts' (or 'post'). I would be using this, for (not) displaying the date and reading time for 'page' content: content/_index.md::
I have also tried
which makes no difference. Any help is much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Where in the Hugo docs are you reading this? The Why don't you just set your default site settings to hide the date and reading time, and then cascade within the posts directory to show these items without needing to target a specific kind? |
Beta Was this translation helpful? Give feedback.
-
You are right. I should be section, I Guess. But that also does not show "posts" either. I'll also consider your suggestion. To test this, I was debugging using the custom footer. And that showed the same value for all content types: pages and posts. And the Section, Type and Layout parameters were alle 'page' or empty. I now know why: it's rendered as a cached partial, so only generated once at deploy.
You can check this in the deploy of my branch: Contact page: https://hide-date--robertvanbregt-nl.netlify.app/contact/ |
Beta Was this translation helpful? Give feedback.
-
I want a lot of meta data shown on all content types but static pages. For now I have settled with this:
content/_index.md ---
# Congo theme
cascade:
- _target:
type: "page"
showDate: false
showReadingTime: false
--- |
Beta Was this translation helpful? Give feedback.
Where in the Hugo docs are you reading this? The
.Kind
variable can only be 5 possible values and all pages, regardless of their section, will be classified aspage
(see the Hugo docs). The.Section
variable will return the base section of the content, which is what you seem to be looking for.Why don't you just set your default site settings to hide the date and reading time, and then cascade within the posts directory to show these items without needing to target a specific kind?