The template vars{{ .Section }} or {{ .Type }} from \post\news\first-news.md shows only “post” not “news”. I wan´t show post (from root), news (subfolder), event (subfolder) etc.
How can i solve this?
Infos: My Single Template ist under \themes\THEME\layouts\post\single.html
From http://gohugo.io/content/types/: “Hugo assumes that your site will be organized into sections and each section will use the corresponding type. … each new piece of content you place into a section will automatically inherit the type.”
If you want to have types separate from the section, you must set “type” in the front matter. If you want to do this a lot, I’d recommend creating a “news” archetype.
I created a “comment” archetype in testsite\themes\ft\archetypes. but it didn’t work so I have to move “comment.md” to testsite\archetypes then it works. I have the code below in comment.md.
When I go to http://localhost:1313/post/first/, it will show all comments. I like to filter the comments under /comment/first/ folder.
I think I should add a where condition at {{ range $commentPages }} but I am not sure which identifier that I can use to filer it. Could you please give me some pointers on this filtering part?