summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-16 09:58:29 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-16 09:58:29 +0200
commitc4f3e92024850df123c81c5ea03e307faaff0470 (patch)
tree785e11db5fdb71f4d1c207562bce0dda5148bf14 /layouts
parent863df1c867d65883e4f3658593ef23e125058eb5 (diff)
downloadgohugo-theme-ed-c4f3e92024850df123c81c5ea03e307faaff0470.tar.gz
Setup site logo
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/home.atom.xml2
-rw-r--r--layouts/partials/templates/opengraph.html7
2 files changed, 6 insertions, 3 deletions
diff --git a/layouts/_default/home.atom.xml b/layouts/_default/home.atom.xml
index ad20269..b1befc0 100644
--- a/layouts/_default/home.atom.xml
+++ b/layouts/_default/home.atom.xml
@@ -6,6 +6,8 @@
<title>{{ site.Title }}</title>
{{ with site.Params.description }}<subtitle>{{ . }}</subtitle>{{ end }}
{{ with site.Home.OutputFormats.Get "Atom" }}<link href="{{ .RelPermalink }}" rel="self" type="{{ .MediaType.Type | html }}" />{{ end }}
+ {{ $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png" ) }}{{ $logo = $logo.Resize "96x96" }}<icon>{{$logo.RelPermalink}}</icon>
+ <logo>{{$logo.RelPermalink}}</logo>
{{ with site.Author.name }}<author>
<name>{{.}}</name>
{{ with site.Author.email }}<email>{{.}}</email>{{end}}
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html
index 3b9fb36..aed77e3 100644
--- a/layouts/partials/templates/opengraph.html
+++ b/layouts/partials/templates/opengraph.html
@@ -18,9 +18,10 @@
<meta property="og:image:height" content="{{ .Params.cover.height }}">
{{- end }}
{{- else }}
- <meta property="og:image" content="{{ "img/open-graph-logo.png" | absURL }}">
- <meta property="og:image:width" content="200">
- <meta property="og:image:height" content="200">
+ {{- $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png" ) }}
+ <meta property="og:image" content="{{ $logo.Permalink }}">
+ <meta property="og:image:width" content="{{ site.Params.assets.logo_width | default 200 }}">
+ <meta property="og:image:height" content="{{ site.Params.assets.logo_height | default 200 }}">
{{- end }}
{{- /* Facebook Page Admin ID for Domain Insights */}}