Skip to content

Commit

Permalink
og_image config should be in header.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Buzoianu committed Apr 12, 2022
1 parent 2642cce commit 502701c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<header>
<div class="main">
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
{{ if .Params.og_image }}
<meta property="og:image" content={{ .Params.og_image | absURL }}/>
{{ end }}
</div>
<nav>
{{ range .Site.Menus.main }}
Expand Down
4 changes: 4 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@

<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
{{ if .Params.og_image -}}
<meta property="og:image" content={{ .Params.og_image | absURL }}/>
{{- else -}}
<meta property="og:image" content="{{ .Site.Params.og_image }}"/>
{{ end }}
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
Expand Down

0 comments on commit 502701c

Please sign in to comment.