Hi, everyone. I have a very specific problem that I need to fix. I have to stick the title of all pages be it article title or section title in the same place in the header. I can detect when the title is under all situations using this code
{{ if .IsHome }}
<h1></h1>
{{ else if .IsSection }}
<h1></h1>
{{ else}}
<time>{{ .Date.Format "January 2, 2006" }}</time>
<h1></h1>
{{ end}}
This is my current structure
content/
articles/
_index.md
art1.md
stacks/ // .IsSection or .IsNode because of _index.md
_index.md
art1.md // .IsPage
_index.md //.IsHome
about.md // here is the problem
contact.md // here is the problem
and this is my page structure
partial head
partial header //title is in here
define main
content
end
partial footer
The problem I have is that I don’t know what to do to remove the date from about.md and contact.md. They appear the same as every other page, and I know hugo doesn’t make a difference between pages, but still one is part of a section and the other two are free of every section. The idea is that I want to have dates added to pages that theoretically are posts.
Is there any way of doing that?
I know this sounds mad but I’m using the header as like the engine of the site. and everything is present there.
Thank you so much for the help, I’m at this for two weeks now.