asw-v01: archive deferred content (packs, site, lab, legacy examples)
- 2.1: packs/ -> archive/packs/ - 2.2: site/ -> archive/site/ - 2.3: src/lab/ -> archive/lab/ - 2.4: examples/ -> archive/examples-legacy/ (SSI-based)
This commit is contained in:
parent
416fe2f180
commit
e47a9f4401
173 changed files with 11 additions and 5 deletions
|
|
@ -1,41 +0,0 @@
|
|||
{{- /*
|
||||
partials/meta/og.html — Open Graph + Twitter Card meta tags
|
||||
|
||||
og:title Page title (site title for home page)
|
||||
og:description .Description → .Site.Params.description → ""
|
||||
og:url .Permalink
|
||||
og:type "website" (home) | "article" (everything else)
|
||||
og:site_name .Site.Title
|
||||
og:image .Params.image → .Site.Params.og_image → absent
|
||||
twitter:card "summary_large_image" when image present, else "summary"
|
||||
twitter:site .Site.Params.twitter (optional @handle)
|
||||
|
||||
Configure in hugo.toml:
|
||||
[params]
|
||||
og_image = "/images/og-default.png" # fallback OG image
|
||||
twitter = "@yourhandle" # omit if not on Twitter/X
|
||||
*/ -}}
|
||||
{{- $title := cond .IsHome .Site.Title (printf "%s · %s" .Title .Site.Title) -}}
|
||||
{{- $desc := or .Description .Site.Params.description "" -}}
|
||||
{{- $image := or .Params.image .Site.Params.og_image "" -}}
|
||||
{{- $type := cond .IsHome "website" "article" -}}
|
||||
|
||||
<meta property="og:title" content="{{ $title }}">
|
||||
<meta property="og:description" content="{{ $desc }}">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:type" content="{{ $type }}">
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}">
|
||||
{{- with $image }}
|
||||
<meta property="og:image" content="{{ . | absURL }}">
|
||||
{{- end }}
|
||||
|
||||
{{- /* Twitter / X Card */}}
|
||||
<meta name="twitter:card" content="{{ if $image }}summary_large_image{{ else }}summary{{ end }}">
|
||||
<meta name="twitter:title" content="{{ $title }}">
|
||||
<meta name="twitter:description" content="{{ $desc }}">
|
||||
{{- with $image }}
|
||||
<meta name="twitter:image" content="{{ . | absURL }}">
|
||||
{{- end }}
|
||||
{{- with .Site.Params.twitter }}
|
||||
<meta name="twitter:site" content="{{ . }}">
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue