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
All checks were successful
Hugo Publish CI / build-and-deploy (push) Successful in 21s
This commit is contained in:
@@ -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
|
||||||
|
|||||||
26
layouts/partials/head.html
Normal file
26
layouts/partials/head.html
Normal 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 }}
|
||||||
Reference in New Issue
Block a user