Skip to content

Commit 5950553

Browse files
committed
seo: use params.author and add ImageObject schema to figures
Move author configuration to [params] for modern Hugo compatibility and update the head partial. Enhance the figure shortcode with structured data, async decoding, and improved alt/caption handling. This improves SEO and future-proofs author references across the site.
1 parent 1a27099 commit 5950553

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎hugo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ enableRobotsTXT = true
1515
blog = "/blog/:slug/"
1616

1717
[params]
18+
author = "Pierre-Henry Soria"
1819
description = "CTO insights, software architecture, engineering leadership, and product strategy. Lessons in building, scaling, and leading teams, with a focus on technical decision-making, business impact, and AI-driven product development."
1920
keywords = ["CTO", "software architecture", "engineering leadership", "product strategy", "AI engineering", "system design", "business impact", "Pierre-Henry Soria"]
2021
title = "Pierre-Henry Soria – Engineering Leadership & Product Strategy"

‎layouts/partials/head.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{- /* Enhanced SEO and social meta tags */ -}}
22
<title>{{ if .Title }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
33
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
4-
<meta name="author" content="{{ .Site.Author }}">
4+
<meta name="author" content="{{ .Site.Params.author }}">
55

66
<!-- Open Graph -->
77
<meta property="og:title" content="{{ if .Title }}{{ .Title }} | {{ end }}{{ .Site.Title }}">

‎layouts/shortcodes/figure.html‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
<figure>
1+
{{- $alt := .Get "alt" | default (.Get "title") | default .Page.Title -}}
2+
{{- $title := .Get "title" | default .Page.Title -}}
3+
<figure itemscope itemtype="https://schema.org/ImageObject">
24
{{- if .Get "link" -}}
35
<a href="{{ .Get "link" }}" target="_blank" rel="noopener">
46
{{- end -}}
5-
<img src="{{ .Get "src" }}" alt="{{ .Get "alt" }}" title="{{ .Get "title" }}" loading="lazy" />
7+
<img src="{{ .Get "src" }}" alt="{{ $alt }}" title="{{ $title }}" loading="lazy" decoding="async" itemprop="contentUrl" />
8+
<meta itemprop="name" content="{{ $title }}" />
69
{{- if .Get "link" -}}</a>{{- end -}}
710
{{- if .Get "caption" -}}
8-
<figcaption class="image-caption">{{ .Get "caption" }}</figcaption>
11+
<figcaption class="image-caption" itemprop="caption">{{ .Get "caption" | markdownify }}</figcaption>
912
{{- end -}}
1013
</figure>

0 commit comments

Comments
 (0)