hello im having a problem in my hugo website my website title is duplicated on google, check the image above, can you guys please help me fix this
my repo is : https://github.com/SamHamou/Aragate
hello im having a problem in my hugo website my website title is duplicated on google, check the image above, can you guys please help me fix this
my repo is : https://github.com/SamHamou/Aragate
You need to override line 7 of themes/casper/layouts/partials/
according to your needs:
<title>{{ if .IsHome }}{{ .Title }}{{ else }}{{ .Title }} − {{ .Site.Title }}{{ end }}</title>
The way to override is by creating the same file under the root of your project like so:
/layouts/partials/head.html
By doing the above you will be able to update the Casper theme in the future while keeping your override at the same time.
Hi sorry im a newbie here you said i have to create another head.html file in the root of my project i understand this but what should i do with the code in line 7
{{ if .IsHome }}{{ .Title }}{{ else }}{{ .Title }} − {{ .Site.Title }}{{ end }}
In the above .Title
stands for the title parameter entered in the front matter of a content file like so:
title = "Some-title"
.Site.Title
refers to the title parameter entered in the configuration file of the project in config.toml
Unfortunately I cannot read Arabic, so I cannot understand the parameters of your project’s content files.