aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-10-03 14:10:03 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-10-03 14:10:03 +0200
commit22ff783d866c07d9d5317427fb71d7a528f208c7 (patch)
tree95d61c1522414cdcecac6cbb43125e65d2e68b9c
parent397ebbc2a49a3d22e709a69842805ccaee6eed78 (diff)
#86, Add google analytics to readme, move GA and enable Open Graph in head
-rw-r--r--README.md28
-rw-r--r--layouts/docs/baseof.html1
-rw-r--r--layouts/home.html1
-rw-r--r--layouts/partials/docs/html-head.html4
-rw-r--r--layouts/posts/baseof.html1
5 files changed, 21 insertions, 14 deletions
diff --git a/README.md b/README.md
index 89f0ffb..28ca9ab 100644
--- a/README.md
+++ b/README.md
@@ -100,7 +100,8 @@ And Enable it by settings `BookMenuBundle: /menu` in Site configuration
## Blog
-Simple blog supported for section `posts`
+Simple blog supported for section `posts`.
+Blog is not primary use case so book theme so it has only minimal features
## Configuration
@@ -156,7 +157,7 @@ BookEditPath = 'edit/master/exampleSite/content'
# - In blog posts
BookDateFormat = 'Jan 2, 2006'
-# (Optional, default true) Enables search function with lunr.js,
+# (Optional, default true) Enables search function with lunr.js,
# Index is built on fly, therefore it might slowdown your website.
BookSearch = true
```
@@ -202,6 +203,13 @@ There are few empty partials you can override in `layouts/partials/`
| `assets/_custom.scss` | Customise or override scss styles |
| `assets/_fonts.scss` | Replace default font with custom fonts (e.g. local files or remote like google fonts) |
+### Hugo Internal Templates
+
+There are few hugo tempaltes inserted in `<head>`
+
+- [Google Analytics](https://gohugo.io/templates/internal/#google-analytics)
+- [Open Graph](https://gohugo.io/templates/internal/#open-graph)
+
## Shortcodes
### Expand
@@ -231,18 +239,16 @@ Useful if you want to show alternative information per platform or setting.
Organize text in 2 or more columns to use space efficiently.
```html
-{{< columns >}} <!-- begin columns block -->
-
-# Left Content Lorem markdownum insigne...
-
-<---> <!-- magic sparator, between columns -->
+{{< columns >}}
+<!-- begin columns block -->
-# Mid Content Lorem markdownum insigne...
+# Left Content Lorem markdownum insigne... <--->
+<!-- magic sparator, between columns -->
-<---> <!-- magic sparator, between columns -->
+# Mid Content Lorem markdownum insigne... <--->
+<!-- magic sparator, between columns -->
-# Right Content Lorem markdownum insigne...
-{{< /columns >}}
+# Right Content Lorem markdownum insigne... {{< /columns >}}
```
### Mermaid Charts
diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html
index eac72f1..6ee6e40 100644
--- a/layouts/docs/baseof.html
+++ b/layouts/docs/baseof.html
@@ -25,7 +25,6 @@
</main>
{{ partial "docs/inject/body" . }}
- {{ template "_internal/google_analytics_async.html" . }}
</body>
</html>
diff --git a/layouts/home.html b/layouts/home.html
index 37f9eeb..06ae844 100644
--- a/layouts/home.html
+++ b/layouts/home.html
@@ -22,7 +22,6 @@ You can override this page in:
</main>
{{ partial "docs/inject/body" . }}
- {{ template "_internal/google_analytics_async.html" . }}
</body>
</html>
diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html
index 3cf5054..599695b 100644
--- a/layouts/partials/docs/html-head.html
+++ b/layouts/partials/docs/html-head.html
@@ -1,5 +1,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
+{{- template "_internal/opengraph.html" . -}}
+
<title>{{ partial "docs/title" . }} | {{ .Site.Title -}}</title>
<!-- Theme stylesheet, you can customize scss by creating `assets/custom.scss` in your website -->
@@ -23,3 +25,5 @@
Made with Book Theme
https://github.com/alex-shpak/hugo-book
{{ "-->" | safeHTML }}
+
+{{ template "_internal/google_analytics_async.html" . }}
diff --git a/layouts/posts/baseof.html b/layouts/posts/baseof.html
index ee20522..c58d552 100644
--- a/layouts/posts/baseof.html
+++ b/layouts/posts/baseof.html
@@ -25,7 +25,6 @@
</main>
{{ partial "docs/inject/body" . }}
- {{ template "_internal/google_analytics_async.html" . }}
</body>
</html>