tmh
May 31, 2019, 4:31pm
1
It seems that Hugo uses the site title instead of the page title for home pages. I couldn’t find documentation about this. Is this intended behavior? Which shortcode can I use to get the page title even in homepage context?
See https://github.com/thomasheller/crab/issues/10 for an example.
Hi @tmh . Do you have a Title defined in front matter for your homepage?
For example, in content/_index.md
do you have a title
param defined?
tmh
May 31, 2019, 6:01pm
3
Hmm. What Hugo version are you using?
tmh
May 31, 2019, 6:18pm
5
Hugo Static Site Generator v0.55.6-A5D4C82D2/extended linux/amd64 BuildDate: 2019-05-18T08:08:34Z
Okay, Hugo version is fine. You can fix this by
(1) Renaming
content/home
To
content/_index.md
(2) Then update layouts/index.html
to be:
{{ partial "header.html" . }}
{{ .Content }}
{{ partial "footer.html" . }}
1 Like
tmh
May 31, 2019, 6:46pm
7
Using _index.md
did the trick. Thanks for your support!