Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Mitrichius/hugo-theme-anubis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kolosov <Mitrichius@users.noreply.github.com>2021-10-20 14:48:08 +0300
committerGitHub <noreply@github.com>2021-10-20 14:48:08 +0300
commit552820a9822d697316e1d473fcb3c4c05d5e334d (patch)
tree891582bbf54de188f7b387e14a9ce91287b5c1d3
parent8b3e9c711ef555c3096a9a0396cf685083fa5c26 (diff)
parent9b375d4a98522b6e4a92b8f8ab7fa2691b0fa420 (diff)
Merge pull request #106 from iakunin/2021-10-19_extracting-title
Extracting <title> to be able to override it in the client code
-rw-r--r--layouts/partials/head.html2
-rw-r--r--layouts/partials/title.html1
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>