feat: Add AdSense, Privacy Policy, and SEO improvements
All checks were successful
Hugo Publish CI / build-and-deploy (push) Successful in 13s
All checks were successful
Hugo Publish CI / build-and-deploy (push) Successful in 13s
This commit is contained in:
34
layouts/partials/head/json-ld.html
Normal file
34
layouts/partials/head/json-ld.html
Normal 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 }}
|
||||
Reference in New Issue
Block a user