From d2d39745c5e736d46f5ccf230209c37fad8b32b1 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Fri, 19 Dec 2025 22:15:38 -0800 Subject: [PATCH] feat: integrate Google AdSense and consolidate head elements into a new partial. --- config.toml | 4 ++++ layouts/partials/head.html | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 layouts/partials/head.html diff --git a/config.toml b/config.toml index c2888a1..af3c153 100644 --- a/config.toml +++ b/config.toml @@ -109,6 +109,10 @@ style = "github-dark" # Enable math rendering (for LaTeX support including $$$$ blocks) math = true + # AdSense Configuration + [params.adsense] + client = "ca-pub-3972604619956476" + # Add new SEO-related parameters [params.seo] # Enable OpenGraph for better social media sharing diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..15405aa --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,26 @@ +{{ partial "head/meta-tags.html" . }} + +{{ if .Params.canonicalUrl }} + +{{ else }} + +{{ end }} + +{{ partialCached "head/theme-styles.html" . }} + +{{ partialCached "head/color-scheme.html" . }} + +{{ partialCached "head/custom-styles.html" . }} + +{{ partialCached "head/custom-icons.html" . }} + +{{ partial "head/alternative-output-formats.html" . }} + +{{ if .IsHome }}{{ partial "head/hugo-generator.html" . }}{{ end }} + +{{ partial "head/extensions.html" . }} + +{{ if .Site.Params.adsense.client }} + +{{ end }}