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

github.com/EmielH/tale-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md10
-rw-r--r--layouts/partials/head.html2
2 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index cc0a97f..f2afdb0 100644
--- a/README.md
+++ b/README.md
@@ -114,6 +114,16 @@ comments: true
---
```
+### Google Analytics
+
+Tale supports Google Analytics integration using Hugo's provided `google_analytics_async` template.
+
+To enable it, add the `googleAnalytics` tag to your `config.toml`. It will be added on all pages.
+
+```toml
+googleAnalytics = "UA-133700000-0"
+```
+
### Custom summaries
Tale allows for writing the summary of your posts manually by setting the `summary` variable in the page frontmatter. If this variable is not set, the summary that Hugo automatically generates will be used.
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 6de6ea5..fb28bad 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,4 +1,6 @@
<head>
+ <!-- Google Analytics -->
+ {{ template "_internal/google_analytics_async.html" . }}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{- if .IsHome }}