Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site title element is not rendered correctly #18

Open
timhere opened this issue Oct 5, 2018 · 1 comment
Open

Site title element is not rendered correctly #18

timhere opened this issue Oct 5, 2018 · 1 comment

Comments

@timhere
Copy link

timhere commented Oct 5, 2018

The <title> element does not contain the correct string.

The behaviour I have observed is this:

  • On the homepage, nothing is passed into the <title> tag
  • On posts or pages, the page title is displayed, followed by a whitespace and then a dot, but the site title is still not present.

I have observed this behaviour in the following locations:

This line in partials/head.html could be the culprit

<title>{{ if .IsHome }}{{ .Title }}{{ else }}{{ .Title }} &middot; {{ .Site.Title }}{{ end }}</title>

Should this line be:

<title>{{ if .IsHome }}{{ .Site.Params.Title }}{{ else }}{{ .Title }} &middot; {{ .Site.Params.Title }}{{ end }}</title>

instead?

@dixonge
Copy link

dixonge commented May 18, 2019

Thank you! For some strange reason this was not affecting my production site (on Netlify) but just my locally served home page. This change fixed it.

I copied the head.html page from the theme folder to my main /layouts/partials folder, then made the changes there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants