Currently I am using single header across all pages. But I would like to add header_2
on all pages that starts with /blog
and all of the child post under /blog
, is that possible?
I’ve tried using:
{{ if path.Dir "/blog" }}
{{ partial "header" . }}
{{ end }}
But it won’t work.
I’ve considered creating different baseof.html layouts but I think that’s kinda dirty as I only need to change the header.
Any advices are greatly appreciated, thank you!