feat: integrate Google AdSense and consolidate head elements into a new partial.
All checks were successful
Hugo Publish CI / build-and-deploy (push) Successful in 21s

This commit is contained in:
2025-12-19 22:15:38 -08:00
parent 1c61274980
commit d2d39745c5
2 changed files with 30 additions and 0 deletions

View File

@@ -109,6 +109,10 @@ style = "github-dark"
# Enable math rendering (for LaTeX support including $$$$ blocks) # Enable math rendering (for LaTeX support including $$$$ blocks)
math = true math = true
# AdSense Configuration
[params.adsense]
client = "ca-pub-3972604619956476"
# Add new SEO-related parameters # Add new SEO-related parameters
[params.seo] [params.seo]
# Enable OpenGraph for better social media sharing # Enable OpenGraph for better social media sharing

View File

@@ -0,0 +1,26 @@
{{ partial "head/meta-tags.html" . }}
{{ if .Params.canonicalUrl }}
<link rel="canonical" href="{{ .Params.canonicalUrl }}">
{{ else }}
<link rel="canonical" href="{{ .Permalink }}">
{{ 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 }}
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ .Site.Params.adsense.client }}"
crossorigin="anonymous"></script>
{{ end }}