Hide author & set default OG image

This commit is contained in:
Gabriel Augendre 2023-05-21 23:15:04 +02:00
parent 344ae572c9
commit 67108f47e3
4 changed files with 6 additions and 5 deletions

View file

@ -19,9 +19,8 @@ params:
title: "Gabs Notes"
description: "My take on tech-related subjects (but not only)."
keywords: [blog, tech, docker, golang, python, self-hosting]
author: "Gabriel Augendre"
# author: ["Me", "You"] # multiple authors
#images: ["<link or path of image for opengraph, twitter-cards>"]
# author: "Gabriel Augendre"
images: ["img/portrait.jpg"]
DateFormat: "2006-01-02"
defaultTheme: auto # dark, light
disableThemeToggle: false

View file

@ -31,7 +31,7 @@ I'm Gabriel, a Go and Python software developer at [OVHcloud](https://www.ovhclo
{{< unsafe >}}
<p class="pictures">
{{< /unsafe >}}
{{< img src="39.jpg" alt="A picture of Gabriel Augendre" >}}
{{< img src="img/portrait.jpg" alt="A picture of Gabriel Augendre" >}}
{{< img src="41.jpg" alt="His usual avatar for online profiles, the dwarf from a medieval fantasy audio story named 'Le Donjon de Naheulbeuk' (French)" >}}
{{< unsafe >}}
</p>

View file

@ -1,5 +1,7 @@
{{ $src := .Get "src" }}
{{ $origImage := .Page.Resources.GetMatch $src }}
{{ $pageImage := .Page.Resources.Get $src }}
{{ $siteImage := resources.Get $src }}
{{ $origImage := $pageImage | default $siteImage }}
{{ if eq $origImage.MediaType.SubType "svg" }}
<img src="{{ $origImage.RelPermalink }}" alt='{{ .Get "alt" }}'>
{{ else }}