diff options
author | Razon Yang <razonyang@gmail.com> | 2020-09-11 11:31:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-11 11:31:22 +0300 |
commit | 00f1ca6856940153b37f18b0bff5a733b2aeae3b (patch) | |
tree | e084086fdb0dbcf4422e19e8139b4069e7cfe486 | |
parent | a7a29541f80cbb00b862c5387ad293049aefa9d9 (diff) |
Add the titleSeparator parameter. (#448)
* Add the titleSeparator parameter
* Add a description for the titleSeparator parameter
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | exampleSite/content/basics/configuration/_index.en.md | 2 | ||||
-rw-r--r-- | layouts/partials/header.html | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 9fa84e1..bea553b 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -15,6 +15,7 @@ defaultContentLanguageInSubdir= true showVisitedLinks = true disableBreadcrumb = false disableNextPrev = false + titleSeparator = "::" [outputs] home = [ "HTML", "RSS", "JSON"] diff --git a/exampleSite/content/basics/configuration/_index.en.md b/exampleSite/content/basics/configuration/_index.en.md index cdf6075..6dbce18 100644 --- a/exampleSite/content/basics/configuration/_index.en.md +++ b/exampleSite/content/basics/configuration/_index.en.md @@ -43,6 +43,8 @@ Note that some of these parameters are explained in details in other sections of themeVariant = "" # Provide a list of custom css files to load relative from the `static/` folder in the site root. custom_css = ["css/foo.css", "css/bar.css"] + # Change the title separator. Default to "::". + titleSeparator = "-" ``` ## Activate search diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 6b23395..2f97f76 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -6,7 +6,7 @@ {{ hugo.Generator }} {{ partial "meta.html" . }} {{ partial "favicon.html" . }} - <title>{{ .Title }} :: {{ .Site.Title }}</title> + <title>{{ .Title }} {{ default "::" .Site.Params.titleSeparator }} {{ .Site.Title }}</title> {{ $assetBusting := not .Site.Params.disableAssetsBusting }} <link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"> |