Skip to content

Commit 00f1ca6

Browse files
authored
Add the titleSeparator parameter. (#448)
* Add the titleSeparator parameter * Add a description for the titleSeparator parameter
1 parent a7a2954 commit 00f1ca6

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

exampleSite/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ defaultContentLanguageInSubdir= true
1515
showVisitedLinks = true
1616
disableBreadcrumb = false
1717
disableNextPrev = false
18+
titleSeparator = "::"
1819

1920
[outputs]
2021
home = [ "HTML", "RSS", "JSON"]

exampleSite/content/basics/configuration/_index.en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Note that some of these parameters are explained in details in other sections of
4343
themeVariant = ""
4444
# Provide a list of custom css files to load relative from the `static/` folder in the site root.
4545
custom_css = ["css/foo.css", "css/bar.css"]
46+
# Change the title separator. Default to "::".
47+
titleSeparator = "-"
4648
```
4749

4850
## Activate search

layouts/partials/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{{ hugo.Generator }}
77
{{ partial "meta.html" . }}
88
{{ partial "favicon.html" . }}
9-
<title>{{ .Title }} :: {{ .Site.Title }}</title>
9+
<title>{{ .Title }} {{ default "::" .Site.Params.titleSeparator }} {{ .Site.Title }}</title>
1010

1111
{{ $assetBusting := not .Site.Params.disableAssetsBusting }}
1212
<link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">

0 commit comments

Comments
 (0)