Skip to content

Commit

Permalink
added image processing information
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEquus committed Dec 31, 2023
1 parent 487a044 commit ca81945
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
{{if .Params.cover }}
{{ $mediaPath := path.Join .Permalink (.Page.Param "mediaPath") }}
{{ $cover := path.Join $mediaPath .Params.cover }}
{{ $image := .Resources.GetMatch (path.Join (.Page.Param "mediaPath") .Params.cover) }}
<meta property="og:image" content="{{ $cover }}">
<meta property="og:image:width" content="{{ $image.Width }}">
<meta property="og:image:height" content="{{ $image.Height }}">
<meta property="og:image:type" content="{{ $image.MediaType.Type }}">
<meta name="twitter:image" content="{{ $cover }}">
{{ end }}
<meta property="og:url" content="{{ .Permalink }}">
Expand Down

0 comments on commit ca81945

Please sign in to comment.