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:
parent
e379039fe8
commit
fe925fc292
3 changed files with 27 additions and 0 deletions
|
|
@ -1,3 +1,13 @@
|
|||
{{define "head"}}
|
||||
<meta property="og:title" content="{{.SiteName}}">
|
||||
<meta property="og:description" content="Lagre og del dine favoritter">
|
||||
<meta property="og:type" content="website">
|
||||
{{if .ExternalURL}}
|
||||
<meta property="og:url" content="{{.ExternalURL}}">
|
||||
{{end}}
|
||||
<meta property="og:site_name" content="{{.SiteName}}">
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
{{if .User}}
|
||||
<hgroup>
|
||||
|
|
|
|||
|
|
@ -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}}">
|
||||
|
|
|
|||
|
|
@ -1,3 +1,15 @@
|
|||
{{define "head"}}
|
||||
{{with .Data}}
|
||||
<meta property="og:title" content="Favoritter med merkelapp: {{.TagName}}">
|
||||
<meta property="og:description" content="{{.Total}} offentlige favoritter med merkelappen «{{.TagName}}»">
|
||||
<meta property="og:type" content="website">
|
||||
{{if $.ExternalURL}}
|
||||
<meta property="og:url" content="{{$.ExternalURL}}/tags/{{.TagName}}">
|
||||
{{end}}
|
||||
<meta property="og:site_name" content="{{$.SiteName}}">
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
{{with .Data}}
|
||||
<hgroup>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue