diff options
author | Maksim Iakunin <yakuninm+github@gmail.com> | 2021-10-19 20:00:18 +0300 |
---|---|---|
committer | Maksim Iakunin <yakuninm+github@gmail.com> | 2021-10-19 20:00:18 +0300 |
commit | 9b375d4a98522b6e4a92b8f8ab7fa2691b0fa420 (patch) | |
tree | 891582bbf54de188f7b387e14a9ce91287b5c1d3 | |
parent | 8b3e9c711ef555c3096a9a0396cf685083fa5c26 (diff) |
Extracting <title> to be able to override it in the client code
-rw-r--r-- | layouts/partials/head.html | 2 | ||||
-rw-r--r-- | layouts/partials/title.html | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 8dfcd5c..3a10107 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -4,7 +4,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="referrer" content="no-referrer-when-downgrade"> -<title>{{ if and (.Title) (not .IsHome) }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title> +{{ partial "title.html" }} <meta name="description" content="{{ .Site.Params.Description }}"> {{ with .OutputFormats.Get "rss" -}} diff --git a/layouts/partials/title.html b/layouts/partials/title.html new file mode 100644 index 0000000..648d9df --- /dev/null +++ b/layouts/partials/title.html @@ -0,0 +1 @@ +<title>{{ if and (.Title) (not .IsHome) }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title> |