From 3369d6d9043265994755cbcd2b9df3a7e8d890cd Mon Sep 17 00:00:00 2001 From: Wonderfall Date: Mon, 21 Mar 2022 05:11:41 +0100 Subject: [PATCH] I should read the docs --- layouts/partials/extend_head.html | 1 + layouts/partials/head.html | 167 ------------------------------ 2 files changed, 1 insertion(+), 167 deletions(-) create mode 100644 layouts/partials/extend_head.html delete mode 100644 layouts/partials/head.html diff --git a/layouts/partials/extend_head.html b/layouts/partials/extend_head.html new file mode 100644 index 0000000..da1c738 --- /dev/null +++ b/layouts/partials/extend_head.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html deleted file mode 100644 index 39607ca..0000000 --- a/layouts/partials/head.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - -{{- if hugo.IsProduction | or (eq .Site.Params.env "production") }} - -{{- else }} - -{{- end }} - -{{- /* Title */}} -{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ .Site.Title }} - -{{- /* Meta */}} -{{- if .IsHome }} -{{ with .Site.Params.keywords -}}{{ end }} -{{- else }} - -{{- end }} - - - -{{- if .Site.Params.analytics.google.SiteVerificationTag }} - -{{- end }} -{{- if .Site.Params.analytics.yandex.SiteVerificationTag }} - -{{- end }} -{{- if .Site.Params.analytics.bing.SiteVerificationTag }} - -{{- end }} - -{{- /* Styles */}} -{{- $theme_vars := (resources.Get "css/core/theme-vars.css") }} -{{- $reset := (resources.Get "css/core/reset.css") }} -{{- $media := (resources.Get "css/core/zmedia.css") }} -{{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }} - -{{- /* include `an-old-hope` if hljs is on */}} -{{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default false) }} -{{- $hljs := (cond ($isHLJSdisabled) (" " | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }} - -{{- /* order is important */}} -{{- $core := (slice $theme_vars $reset $common $hljs $media) | resources.Concat "assets/css/core.css" }} -{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" }} - -{{- /* bundle all required css */}} -{{- /* Add extended css after theme style */ -}} -{{- $stylesheet := (slice $core $extended) | resources.Concat "assets/css/stylesheet.css" | minify }} - -{{- if not .Site.Params.assets.disableFingerprinting }} -{{- $stylesheet := $stylesheet | fingerprint }} - -{{- else }} - -{{- end }} - -{{- with .Site.Params.profileMode }} -{{- if and .enabled .imageUrl $.IsHome }} - -{{- end }} -{{- end }} - -{{- with .Site.Params.label.icon }} - -{{- end }} - -{{- /* Search */}} -{{- if (eq .Layout `search`) -}} - -{{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" .Site.Params.fuseOpts)) }} -{{- $fusejs := resources.Get "js/fuse.js" }} -{{- if not .Site.Params.assets.disableFingerprinting }} -{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }} - -{{- else }} -{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} - -{{- end }} -{{- end -}} - -{{- /* Highlight.js */}} -{{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} -{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} -{{- if not .Site.Params.assets.disableFingerprinting }} -{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} - -{{- else }} -{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }} - -{{- end }} -{{- end }} - -{{- /* Favicons */}} - - - - - - - - -{{- /* Generator */}} -{{ hugo.Generator }} - -{{- /* RSS */}} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} -{{- range .AllTranslations -}} - -{{ end -}} - - - -{{- partial "extend_head.html" . -}} - -{{- /* Misc */}} -{{- if hugo.IsProduction | or (eq .Site.Params.env "production") }} -{{- template "_internal/google_analytics.html" . }} -{{- template "partials/templates/opengraph.html" . }} -{{- template "partials/templates/twitter_cards.html" . }} -{{- template "partials/templates/schema_json.html" . }} -{{- end -}}