diff --git a/Dockerfile b/Dockerfile index 1331386..12a0338 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,8 @@ RUN apk add --update hugo WORKDIR /opt/HugoApp COPY . . +# Add analytics +COPY layouts/partials/head.html themes/hugo-blog-awesome/layouts/partials/head.html RUN hugo diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..f270ec2 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,45 @@ + + {{- partial "meta/main.html" . }} + {{- hugo.Generator }} + + {{/* Canonical link, RSS */}} + + + {{- with .OutputFormats.Get "RSS" }} + + + {{- end }} + + {{- /* Styles */ -}} + + {{- $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "style.scss" . | toCSS (dict "targetPath" "style.css") | minify | fingerprint }} + + {{- $code_syntax_highlight_css := resources.Get "code-highlight.css" | minify | fingerprint }} + + + {{/* Favicons */}} + + + + + + + {{- partial "webmanifest.html" . -}} + {{- partial "browserconfig.html" . -}} + + + + {{/* SVG favicon for the modern web */}} + + + + {{/* Katex support (enabled on specific pages). See 'helpers/katex.html' for more info. */}} + + {{- if or .Params.math .Site.Params.math }}{{ partial "helpers/katex.html" . -}}{{- end -}} + + {{/* Google analytics script. See config.toml to enable/disable this. */}} + {{- if hugo.IsProduction | or (eq site.Params.env "production") }} + {{ template "_internal/google_analytics.html" . }} + {{- end -}} + +