feat: add OG meta tags to home page, tag browse, and profile bio

Complete Open Graph coverage across all public pages:

- Home page: og:title (site name), og:description, og:type=website,
  og:url, og:site_name
- Tag browse: og:title with tag name, og:description with count,
  og:url, og:site_name
- Profile: add og:description using bio (truncated to 200 chars)
  with fallback to generic text

Previously only fave detail and profile (without description) had
OG tags.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2026-04-07 10:54:23 +02:00
commit fe925fc292
3 changed files with 27 additions and 0 deletions

View file

@ -2,6 +2,11 @@
{{with .Data}}{{$d := .}}{{with .ProfileUser}}
{{if eq .ProfileVisibility "public"}}
<meta property="og:title" content="{{.DisplayNameOrUsername}} sine favoritter">
{{if .Bio}}
<meta property="og:description" content="{{truncate 200 .Bio}}">
{{else}}
<meta property="og:description" content="{{.DisplayNameOrUsername}} sine favoritter på {{$.SiteName}}">
{{end}}
<meta property="og:type" content="profile">
{{if $.ExternalURL}}
<meta property="og:url" content="{{$.ExternalURL}}/u/{{.Username}}">