Skip to content

Commit 2423bbf

Browse files
johanrinclaude
andcommitted
Add Person schema to homepage for author recognition
Adds JSON-LD Person structured data with name, avatar, description, and social profile links (GitHub, X, LinkedIn). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent faa7c11 commit 2423bbf

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

layouts/partials/custom-head.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,30 @@
99
<meta name="robots" content="noindex, nofollow" />
1010
{{ end }}
1111

12+
{{/* Person schema for homepage - helps search engines understand the author */}}
13+
{{ if .IsHome }}
14+
<script type="application/ld+json">
15+
{
16+
"@context": "https://schema.org",
17+
"@type": "Person",
18+
"name": "{{ .Site.Params.author.name }}",
19+
"url": "{{ .Site.BaseURL }}",
20+
"image": "{{ .Site.BaseURL }}avatar.jpg",
21+
"description": "{{ .Site.Params.author.description }}",
22+
"sameAs": [
23+
{{- $first := true -}}
24+
{{- range .Site.Params.socialIcons -}}
25+
{{- if ne .name "Rss" -}}
26+
{{- if not $first }},{{ end -}}
27+
"{{ .url }}"
28+
{{- $first = false -}}
29+
{{- end -}}
30+
{{- end -}}
31+
]
32+
}
33+
</script>
34+
{{ end }}
35+
1236
{{/* Canonical URL */}}
1337
<link rel="canonical" href="{{ .Permalink }}" />
1438

0 commit comments

Comments
 (0)