Hermit-V2 Theme Update

This commit is contained in:
GitHub Action 2023-11-28 14:47:18 +00:00
parent d815aab4db
commit ac03834fbb
4 changed files with 29 additions and 24 deletions

View file

@ -83,6 +83,7 @@ enableEmoji = true
readTimeSeparator = "CHANGE ME READ TIME" readTimeSeparator = "CHANGE ME READ TIME"
# legacyLayout = false # legacyLayout = false
shareSocial = true shareSocial = true
# googleTagManager = "GTM-XXXXXXXX"
[[params.socialLinks]] [[params.socialLinks]]
name = "mastodon" name = "mastodon"

View file

@ -1,6 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{.Site.LanguageCode}}"> <html lang="{{.Site.LanguageCode}}">
<head> <head>
{{- if .Site.Params.googleTagManager -}}{{- partial "googleTagManager_head.html" . -}}{{- end -}}
{{- partial "analytics.html" . -}} {{- partial "analytics.html" . -}}
{{- partial "site-meta.html" -}} {{- partial "site-meta.html" -}}
{{ $author := (.Params.author | default .Site.Params.author.name) -}} {{ $author := (.Params.author | default .Site.Params.author.name) -}}
@ -25,6 +26,7 @@
{{- block "head" . -}}{{- end -}} {{- block "head" . -}}{{- end -}}
{{- if templates.Exists "partials/extra-head.html" -}}{{- partial "extra-head.html" . -}}{{- end -}}</head> {{- if templates.Exists "partials/extra-head.html" -}}{{- partial "extra-head.html" . -}}{{- end -}}</head>
<body id="page"> <body id="page">
{{- if .Site.Params.googleTagManager -}}{{- partial "googleTagManager_body.html" . -}}{{- end -}}
{{- block "header" . -}}{{ end -}} {{- block "header" . -}}{{ end -}}
{{- block "main" . -}}{{ end -}} {{- block "main" . -}}{{ end -}}
{{- block "footer" . -}}{{ end }} {{- block "footer" . -}}{{ end }}

View file

@ -0,0 +1 @@
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ .Site.Params.googleTagManager }}" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

View file

@ -0,0 +1 @@
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','{{ .Site.Params.googleTagManager }}');</script>