Skip to content

All content has 'page' kind? #375

Answered by jpanther
metbril asked this question in Q&A
Nov 18, 2022 · 3 comments · 3 replies
Discussion options

You must be logged in to vote

As per the Hugo docs, I was expecting the about page to show 'page' and hello world to show 'posts' (or 'post').

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 as page (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?

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by metbril
Comment options

You must be logged in to vote
2 replies
@jpanther
Comment options

@metbril
Comment options

Comment options

You must be logged in to vote
1 reply
@metbril
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants