Add url to schema, fix json

This commit is contained in:
Ivaylo Ivanov 2025-02-19 12:04:42 +01:00
parent 7b4b38072d
commit 4abc133ca9

View File

@ -6,11 +6,12 @@
"name": "{{ .Site.Title }}", "name": "{{ .Site.Title }}",
"url": "{{ .Site.BaseURL }}", "url": "{{ .Site.BaseURL }}",
"description": "{{ .Site.Params.description }}", "description": "{{ .Site.Params.description }}",
"thumbnailUrl": "{{ .Site.BaseURL }}favicon/favicon-32x32.png", "thumbnailUrl": "{{ .Site.BaseURL }}favicon/favicon-32x32.png"
} }
</script> </script>
{{ else if .IsPage }} {{ else if .IsPage }}
{{ $author := or (.Params.author) (.Site.Params.Author.name) }} {{ $author := or (.Params.author) (.Site.Params.Author.name) }}
{{ $authorUrl := or (.Params.authorUrl) (.Site.Params.Author.url) }}
{{ $org_name := .Site.Title }} {{ $org_name := .Site.Title }}
<script type="application/ld+json"> <script type="application/ld+json">
{ {
@ -27,7 +28,8 @@
}, },
"author" : { "author" : {
"@type": "Person", "@type": "Person",
"name": "{{ $author }}" "name": "{{ $author }}",
"url": "{{ $authorUrl }}"
}, },
"creator" : { "creator" : {
"@type": "Person", "@type": "Person",