Skip to content

Commit

Permalink
Merge pull request #42 from y0z/feature/default-thumbnail
Browse files Browse the repository at this point in the history
Introduce a default image for og:image
  • Loading branch information
not522 authored Nov 1, 2024
2 parents 3c0825b + 956c381 commit 321065e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions themes/hub/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
{{- $imageUrl := partial "thumbnail.html" . }}
{{- if $imageUrl }}
<meta property="og:image" content="{{ absURL $imageUrl }}">
{{- else }}
<meta property="og:image" content="{{ absURL (resources.Get "img/[email protected]").RelPermalink }}">
{{- end }}
<meta name="twitter:card" content="summary_large_image">
<title>{{ $title }}</title>
Expand Down

0 comments on commit 321065e

Please sign in to comment.