This commit is contained in:
Nuno Coração committed 2026-07-02 12:40:25 +01:00
commit 694df4423e
2 files changed
+23 -5

No files matched your search

+20 -2
View File
@@ -17,6 +17,22 @@
</script>
{{ else }}
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
{{- /* Resolve the author: first `authors` front matter key looked up in data/authors/, else the site author. */ -}}
{{- $author := .Site.Params.Author -}}
{{- with .Params.authors -}}
{{- with index site.Data.authors (index . 0 | lower) -}}
{{- $author = . -}}
{{- end -}}
{{- end -}}
{{- /* sameAs from social profiles: data/authors uses `social`, the site author uses `links` (each a {platform: url} map). */ -}}
{{- $sameAs := slice -}}
{{- range (or $author.social $author.links) -}}
{{- range $platform, $url := . -}}
{{- if not (strings.HasPrefix $url "mailto:") -}}
{{- $sameAs = $sameAs | append $url -}}
{{- end -}}
{{- end -}}
{{- end -}}
<script type="application/ld+json">
[{
"@context": "https://schema.org",
@@ -29,7 +45,9 @@
"url" : {{ .Permalink }},
"author" : {
"@type": "Person",
"name": "{{ .Site.Params.Author.name | safeJS }}"
"name": "{{ $author.name | safeJS }}"{{ with $author.image }},
"image": {{ . | absURL }}{{ end }}{{ if $sameAs }},
"sameAs": [{{ range $i, $u := $sameAs }}{{ if $i }}, {{ end }}{{ $u }}{{ end }}]{{ end }}
},
{{ with .PublishDate }}"copyrightYear": "{{ .Format "2006" }}",{{ end }}
{{ with .Date }}"dateCreated": "{{ .Format $iso8601 }}",{{ end }}
@@ -41,7 +59,7 @@
{{ else }}
{{ with .Params.tags }}"keywords": {{ . }},{{ end }}
{{ end }}
"mainEntityOfPage": "true",
"mainEntityOfPage": {{ .Permalink }},
"wordCount": "{{ .WordCount }}"
}{{ if site.Params.enableStructuredBreadcrumbs | default false }},
{
+3 -3
View File
@@ -2170,9 +2170,9 @@
"license": "BSD-3-Clause"
},
"node_modules/dompurify": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.3.tgz",
"integrity": "sha512-VVwJidIJcp1hpg2OMXML3ZVRPYSZiq4aX7qBh83BSIpOaRDqI+qxhXjjIWnpzkOXhmp0L81lnoME1mnCc9H48A==",
"version": "3.4.11",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.11.tgz",
"integrity": "sha512-zhlUV12GsaRzMsf9q5M254YhA4+VuF0fG+QFqu6aYpoGlKtz+w8//jBcGVYBgQkR5GHjUomejY84AV+/uPbWdw==",
"dev": true,
"license": "(MPL-2.0 OR Apache-2.0)",
"optionalDependencies": {