Skip to content

Commit

Permalink
update opengraph
Browse files Browse the repository at this point in the history
  • Loading branch information
x64onl committed Feb 8, 2025
1 parent 336a399 commit a284deb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
7 changes: 2 additions & 5 deletions themes/x64/layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ if .IsHome }}
<title>{{ site.Title }}</title>
{{ else }}
<title>{{ printf "%s — %s" .Title site.Title }}</title>
{{ end }}
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s — %s" .Title site.Title }}{{ end }}</title>
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
{{ partial "opengraph.html" . }}
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🌎</text></svg>">
{{ with .OutputFormats.Get "rss" -}}{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}{{ end }}
Expand Down
11 changes: 9 additions & 2 deletions themes/x64/layouts/partials/opengraph.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />
<!-- meta property="og:image" content="https://opengraph.b-cdn.net/production/images/bc4ed9e0-2cef-46d7-920b-c62a608e3c0a.png?token=PrsId-woDuuCUj-KkY6jejHhmWp3hHTVT2r7IAHAvIQ&height=673&width=1200&expires=33275051342" -->
<meta name="twitter:card" content="summary_large_image">
<!-- meta property="twitter:domain" content="cyberdrew.onl" -->
<meta property="twitter:url" content="{{ .Permalink }}">
<meta name="twitter:title" content="{{ .Title }}">
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
<!-- meta name="twitter:image" content="https://opengraph.b-cdn.net/production/images/bc4ed9e0-2cef-46d7-920b-c62a608e3c0a.png?token=PrsId-woDuuCUj-KkY6jejHhmWp3hHTVT2r7IAHAvIQ&height=673&width=1200&expires=33275051342" -->

0 comments on commit a284deb

Please sign in to comment.