From 45f8e2d134e3dd716c5a47d15ab55266cb354ec9 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 3 Dec 2023 13:14:59 -0800 Subject: add `treefmt` and `pre-commit-hooks` I can now run `nix fmt` or `nix flake check` to check the syntax for various files in this repository. Fixed a deprecation warning for `hugo`: ``` > WARN The author key in site configuration is deprecated. Use params.author.email instead. > WARN The author key in site configuration is deprecated. Use params.author.name instead. ``` --- layouts/index.atom.xml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'layouts') diff --git a/layouts/index.atom.xml b/layouts/index.atom.xml index 1d73f9b..a80fc53 100644 --- a/layouts/index.atom.xml +++ b/layouts/index.atom.xml @@ -2,20 +2,28 @@ {{ .Site.Title }} - {{ .Permalink }}{{ with .Site.Author.name }} + {{ .Permalink }} + + {{ with .Site.Params.Author.name }} - {{.}}{{ with $.Site.Author.email }} - {{.}}{{end}} - {{end}} + {{.}} + {{ with $.Site.Params.Author.email }} + {{.}} + {{end}} + + {{end}} + Hugo -- gohugo.io {{ range where (first 10 (where .Site.Pages "Section" "blog")) "Params.hidden" "ne" "true" }} {{ `<![CDATA[` | safeHTML }}{{ .Title }}]]> - {{ .Permalink }}{{ with .Site.Params.Author }} + {{ .Permalink }} + {{ with .Site.Params.Author.name }} {{.}} - {{end}} + + {{end}} {{- $fmt := "2006-01-02T15:04:05-07:00" }} {{ .Date.Format $fmt | safeHTML }} {{ ` -- cgit v1.2.3