Improve per-page SEO with dynamic meta tags and canonical URLs
OG/Twitter tags now use page-specific titles and descriptions instead of hardcoded site-wide defaults. Added canonical URLs, og:locale with alternate languages, and unique titles/descriptions to all content pages (use-case personas, community, press kit, about pages) in both EN and FR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
15866cc322
commit
b85d01c31f
17 changed files with 48 additions and 20 deletions
|
|
@ -19,20 +19,32 @@
|
|||
<meta name="description" content="{{ .Site.Params.DefaultDescription }}">
|
||||
{{ end }}
|
||||
|
||||
{{- $title := .Title | default "happyDomain" }}
|
||||
{{- $description := .Description | default .Site.Params.DefaultDescription }}
|
||||
{{- $image := .Params.og_image | default (printf "%simg/og.webp" .Site.BaseURL) }}
|
||||
{{- $pageURL := .Permalink | default .Site.BaseURL }}
|
||||
|
||||
<!-- Canonical URL -->
|
||||
<link rel="canonical" href="{{ $pageURL }}">
|
||||
|
||||
<!-- Facebook Meta Tags -->
|
||||
<meta property="og:url" content="{{ .Site.BaseURL }}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="happyDomain">
|
||||
<meta property="og:description" content="{{ .Site.Params.DefaultDescription }}">
|
||||
<meta property="og:image" content="{{ .Site.BaseURL }}img/og.webp">
|
||||
<meta property="og:url" content="{{ $pageURL }}">
|
||||
<meta property="og:type" content="{{ if .IsHome }}website{{ else }}article{{ end }}">
|
||||
<meta property="og:title" content="{{ $title }}">
|
||||
<meta property="og:description" content="{{ $description }}">
|
||||
<meta property="og:image" content="{{ $image }}">
|
||||
<meta property="og:locale" content="{{ .Lang }}">
|
||||
{{ range .Translations }}
|
||||
<meta property="og:locale:alternate" content="{{ .Lang }}">
|
||||
{{ end }}
|
||||
|
||||
<!-- Twitter Meta Tags -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta property="twitter:domain" content="happydomain.org">
|
||||
<meta property="twitter:url" content="{{ .Site.BaseURL }}">
|
||||
<meta name="twitter:title" content="happyDomain">
|
||||
<meta name="twitter:description" content="{{ .Site.Params.DefaultDescription }}">
|
||||
<meta name="twitter:image" content="{{ .Site.BaseURL }}img/og.webp">
|
||||
<meta property="twitter:url" content="{{ $pageURL }}">
|
||||
<meta name="twitter:title" content="{{ $title }}">
|
||||
<meta name="twitter:description" content="{{ $description }}">
|
||||
<meta name="twitter:image" content="{{ $image }}">
|
||||
|
||||
<!-- Mastodon proof -->
|
||||
<link rel="me" href="https://floss.social/@happyDomain">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue