From 3e665936d62c65596c6788ba84e9f12fc871a287 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Fri, 26 Jan 2024 11:50:15 +0100 Subject: [PATCH] =?UTF-8?q?Ajouter=20des=20ent=C3=AAtes=20HTML?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hugo-theme-relearn/layouts/home/index.html | 18 +++++++++++++----- .../layouts/partials/meta.html | 3 ++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/themes/hugo-theme-relearn/layouts/home/index.html b/themes/hugo-theme-relearn/layouts/home/index.html index 826359c..32eff68 100644 --- a/themes/hugo-theme-relearn/layouts/home/index.html +++ b/themes/hugo-theme-relearn/layouts/home/index.html @@ -1,16 +1,24 @@ -{{- $assetBusting := not .Site.Params.disableAssetsBusting }} -{{- $page := . }} -{{- $themevariants := slice | append (.Site.Params.themeVariant | default "auto" ) }} +{{- $assetBusting := not .Site.Params.disableAssetsBusting -}} +{{- $page := . -}} +{{- $themevariants := slice | append (.Site.Params.themeVariant | default "auto" ) -}} <!DOCTYPE html> <html lang="{{ .Page.Language | default " en" }}" dir="{{ T " Reading-direction" | default "ltr" }}"> <head> {{- partial "meta.html" . }} + {{- partialCached "favicon.html" . }} <link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"> <link href="{{"css/home.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"> <link href="{{"css/fonts.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"> - <title>{{ .Page.Title }}</title> + {{ with .OutputFormats.Get "rss" -}} + {{- printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML -}} + {{ end }} + <link rel="alternate" hreflang="fr" href="{{"fr" | relURL}}"> + <link rel="alternate" hreflang="en" href="{{"en" | relURL}}"> + <meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}"> + <meta property="og:title" content="{{ .Site.Title }}"> + <meta property="og:type" content="website"> + <title>{{ .Site.Title }}</title> <base href="{{ .Site.BaseURL }}"> - {{- partialCached "favicon.html" . }} <script> const baseUriFull='{{ trim .Site.BaseURL "/" | safeJS }}/'; const localStorageThemeKey = baseUriFull + 'variant'; diff --git a/themes/hugo-theme-relearn/layouts/partials/meta.html b/themes/hugo-theme-relearn/layouts/partials/meta.html index cffe51c..cda8264 100644 --- a/themes/hugo-theme-relearn/layouts/partials/meta.html +++ b/themes/hugo-theme-relearn/layouts/partials/meta.html @@ -16,4 +16,5 @@ <meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}"> {{- with .Site.Params.author }} <meta name="author" content="{{ . }}"> - {{- end }} \ No newline at end of file + {{- end }} + <link rel="license" href="https://www.etalab.gouv.fr/licence-ouverte-open-licence/"> \ No newline at end of file -- GitLab