diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-18 20:22:10 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-18 20:22:10 +0200 |
| commit | d01eb91363ad385fa62125976441ea71ceeb43ba (patch) | |
| tree | a97146aed4bce8012a5144a7c5b76b2c1714290e /themes/danix-xyz-hacker/layouts/_default/baseof.html | |
| parent | c5e429da6c19a2331fbedcb64839a66760214563 (diff) | |
| download | danixxyz-d01eb91363ad385fa62125976441ea71ceeb43ba.tar.gz danixxyz-d01eb91363ad385fa62125976441ea71ceeb43ba.zip | |
feat: add Open Graph and Twitter Card meta tags for social sharing
Implement comprehensive OG and Twitter Card support:
- og:title, og:description, og:image, og:type (website/article)
- og:article:published_time and og:article:author for article pages
- twitter:card with summary_large_image, twitter:title, twitter:description, twitter:image
- Per-page description from excerpt field with fallback to site description
- Article-specific tags only rendered for pages with dates
- Default dark thumbnail fallback when article has no image
- Empty twitterHandle param (optional fill-in for users)
Extracted head meta into new partial for maintainability.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Diffstat (limited to 'themes/danix-xyz-hacker/layouts/_default/baseof.html')
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/_default/baseof.html | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/themes/danix-xyz-hacker/layouts/_default/baseof.html b/themes/danix-xyz-hacker/layouts/_default/baseof.html index 9370157..1f5dc97 100644 --- a/themes/danix-xyz-hacker/layouts/_default/baseof.html +++ b/themes/danix-xyz-hacker/layouts/_default/baseof.html @@ -3,11 +3,7 @@ <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta name="description" content="{{ .Site.Params.siteDescription }}"> - <meta property="og:locale" content="{{ .Site.Language.Params.locale }}"> - <meta property="og:type" content="website"> - <meta property="og:url" content="{{ .Permalink }}"> - <meta property="og:site_name" content="{{ .Site.Title }}"> + {{ partial "head-meta.html" . }} <title>{{ .Title }}{{ if ne .Title .Site.Title }} — {{ .Site.Title }}{{ end }}</title> <!-- Favicon --> |
