aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/head/meta.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/head/meta.html')
-rw-r--r--layouts/partials/head/meta.html42
1 files changed, 31 insertions, 11 deletions
diff --git a/layouts/partials/head/meta.html b/layouts/partials/head/meta.html
index 23a770a..329d9bf 100644
--- a/layouts/partials/head/meta.html
+++ b/layouts/partials/head/meta.html
@@ -1,12 +1,32 @@
-<meta charset="UTF-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
+{{ $favicon := resources.GetMatch .Site.Params.favicon }}
+
+<meta charset="UTF-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }}{{ end }}</title>
-<meta name="description"
- content="{{ if .IsPage }}{{ or .Params.description .Summary }}{{ else if .IsHome }}{{ .Site.Params.description }}{{ else if .IsNode }}{{ or .Params.description .Summary }}{{ end }}">
-<link rel="canonical" href="{{ .Permalink }}">
-<link rel="robots" href="/robots.txt" />
-{{ with .OutputFormats.Get "rss" -}}
-{{ printf `
-<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
-{{ end }} \ No newline at end of file
+<meta
+ name="description"
+ content="{{ if .IsPage }}{{ or .Params.description .Summary }}{{ else if .IsHome }}{{ .Site.Params.description }}{{ else if .IsNode }}{{ or .Params.description .Summary }}{{ end }}"
+/>
+<link rel="canonical" href="{{ .Permalink }}" />
+<link rel="robots" href="/robot.txt" />
+
+<link rel="icon" type="image/x-icon" href="{{ $favicon.RelPermalink }}" />
+
+{{ if .Site.Config.Services.GoogleAnalytics.ID }}
+<!-- Google Analytics -->
+<script
+ defer
+ src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Config.Services.GoogleAnalytics.ID }}"
+></script>
+<script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag() {
+ dataLayer.push(arguments);
+ }
+ gtag('js', new Date());
+
+ gtag('config', '{{ .Site.Config.Services.GoogleAnalytics.ID }}');
+</script>
+<!-- End Google Analytics -->
+{{ end }}