From 0f3ba05d4cc50b3a1f9f84cb6f72ab9ea124dc36 Mon Sep 17 00:00:00 2001
From: Jaemin Choi <1dotolee@gmail.com>
Date: Wed, 15 Nov 2023 02:41:33 +0900
Subject: [PATCH] feat: apply open graph
---
layouts/partials/head.html | 64 ++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
create mode 100644 layouts/partials/head.html
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..3b8c6e5
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,64 @@
+
+
+ {{- .Site.Title }}
+ {{- if not hugo.IsProduction }}
+
+ {{- end }}
+
+
+
+
+
+
+
+
+ {{ block "head/favicon" . }}{{ partialCached "head/favicon.html" . }}{{ end }}
+
+ {{- partial "google-fonts" . }}
+
+ {{ template "_internal/opengraph.html" . }}
+
+ {{- $options := dict "enableSourceMap" true }}
+ {{- if hugo.IsProduction}}
+ {{- $options := dict "enableSourceMap" false "outputStyle" "compressed" }}
+ {{- end }}
+ {{- $style := resources.Get "/scss/style.scss" }}
+ {{- $style = $style | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS $options }}
+ {{- if hugo.IsProduction }}
+ {{- $style = $style | minify | fingerprint "sha384" }}
+ {{- end -}}
+
+
+ {{ $js := resources.Get "js/bootstrap.js" }}
+ {{ $params := dict }}
+ {{ $sourceMap := cond hugo.IsProduction "" "inline" }}
+ {{ $opts := dict "sourceMap" $sourceMap "minify" hugo.IsProduction "target" "es2018" "params" $params }}
+ {{ $js = $js | js.Build $opts }}
+ {{ if hugo.IsProduction }}
+ {{ $js = $js | fingerprint "sha384" }}
+ {{ end }}
+
+
+ {{ if .Site.Data.landing.image_compare.enable }}
+ {{ $imagecompare := resources.Get "js/image-compare-viewer.min.js" }}
+ {{- if not .Site.IsServer }}
+ {{- $js := (slice $imagecompare) | resources.Concat "/js/image-compare.js" | minify | fingerprint "sha384" }}
+
+ {{- else }}
+ {{- $js := (slice $imagecompare) | resources.Concat "/js/image-compare.js" }}
+
+ {{- end }}
+ {{- end }}
+
+ {{- if not .Site.IsServer }}
+ {{ if and (.Site.Params.plausible.scriptURL) (.Site.Params.plausible.dataDomain) -}}
+ {{- partialCached "head/plausible" . }}
+ {{- end -}}
+ {{- end -}}
+
+ {{- if not .Site.IsServer }}
+ {{- if .Site.GoogleAnalytics }}
+ {{- template "_internal/google_analytics.html" . -}}
+ {{- end -}}
+ {{- end -}}
+