feat: Add AdSense, Privacy Policy, and SEO improvements
All checks were successful
Hugo Publish CI / build-and-deploy (push) Successful in 13s

This commit is contained in:
2025-12-19 22:32:43 -08:00
parent 3b723ecfad
commit 4c1d048f35
2 changed files with 38 additions and 1 deletions

View File

@@ -21,6 +21,9 @@
{{ partial "head/extensions.html" . }} {{ partial "head/extensions.html" . }}
{{ if .Site.Params.adsense.client }} {{ if .Site.Params.adsense.client }}
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ .Site.Params.adsense.client }}" <script async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ .Site.Params.adsense.client }}"
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
{{ end }} {{ end }}
{{ partial "head/json-ld.html" . }}

View File

@@ -0,0 +1,34 @@
{{ if .Site.Params.schema }}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "{{ .Site.Params.schema.type }}",
"name": "{{ .Site.Params.schema.name }}",
"url": "{{ .Site.BaseURL }}",
"description": "{{ .Site.Params.schema.description }}",
"sameAs": [
{{ range $index, $url := .Site.Params.schema.sameAs }}{{ if $index }}, {{ end }}"{{ $url }}"{{ end }}
]
}
</script>
{{ end }}
{{ if .IsPage }}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BlogPosting",
"headline": "{{ .Title }}",
"genre": "{{ .Params.categories | default "Blog" }}",
"wordcount": "{{ .WordCount }}",
"url": "{{ .Permalink }}",
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05-07:00" }}",
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" }}",
"description": "{{ .Description | default .Summary }}",
"author": {
"@type": "Person",
"name": "{{ .Site.Params.author }}"
}
}
</script>
{{ end }}