Add the titleSeparator parameter. (#448)

* Add the titleSeparator parameter

* Add a description for the titleSeparator parameter
This commit is contained in:
Razon Yang 2020-09-11 16:31:22 +08:00 committed by GitHub
parent a7a29541f8
commit 00f1ca6856
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View file

@ -15,6 +15,7 @@ defaultContentLanguageInSubdir= true
showVisitedLinks = true showVisitedLinks = true
disableBreadcrumb = false disableBreadcrumb = false
disableNextPrev = false disableNextPrev = false
titleSeparator = "::"
[outputs] [outputs]
home = [ "HTML", "RSS", "JSON"] home = [ "HTML", "RSS", "JSON"]

View file

@ -43,6 +43,8 @@ Note that some of these parameters are explained in details in other sections of
themeVariant = "" themeVariant = ""
# Provide a list of custom css files to load relative from the `static/` folder in the site root. # 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"] custom_css = ["css/foo.css", "css/bar.css"]
# Change the title separator. Default to "::".
titleSeparator = "-"
``` ```
## Activate search ## Activate search

View file

@ -6,7 +6,7 @@
{{ hugo.Generator }} {{ hugo.Generator }}
{{ partial "meta.html" . }} {{ partial "meta.html" . }}
{{ partial "favicon.html" . }} {{ partial "favicon.html" . }}
<title>{{ .Title }} :: {{ .Site.Title }}</title> <title>{{ .Title }} {{ default "::" .Site.Params.titleSeparator }} {{ .Site.Title }}</title>
{{ $assetBusting := not .Site.Params.disableAssetsBusting }} {{ $assetBusting := not .Site.Params.disableAssetsBusting }}
<link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"> <link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">