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

github.com/jbub/ghostwriter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Dechamps <etienne@edechamps.fr>2017-11-14 10:21:16 +0300
committerJuraj Bubniak <juraj.bubniak@gmail.com>2017-11-14 10:21:16 +0300
commit541925a8576418d47f687c46183358a47034bac2 (patch)
tree68da37f381d760ea7de2c91677cfcdfdca02de1c
parent1555cbf952150c95beb33264aea9a7c004d46caa (diff)
Add a new "extra-in-head" customizable partial. (#40)
The partial is empty as it is meant as an extension point for users, who can use it to inject arbitrary HTML into <head> without having to maintain a fork of the theme. Background: https://discourse.gohugo.io/t/how-to-override-css-classes-with-hugo/3033/9
-rw-r--r--README.md3
-rw-r--r--layouts/partials/extra-in-head.html0
-rw-r--r--layouts/partials/header.html1
3 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index cef94b9..c5c4dd2 100644
--- a/README.md
+++ b/README.md
@@ -96,3 +96,6 @@ disqusShortname = "XXX"
url = "/page/about/"
weight = 4
```
+
+You can also inject arbitrary HTML into `<head>` simply by overriding the `extra-in-head.html`
+partial, which is meant for that purpose.
diff --git a/layouts/partials/extra-in-head.html b/layouts/partials/extra-in-head.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/partials/extra-in-head.html
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 5c553b3..7414913 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -17,6 +17,7 @@
{{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml">
{{ end }}
+ {{ partial "extra-in-head.html" . }}
</head>
<body>
{{ template "_internal/google_analytics.html" . }}