From d292e993a13661a25ca4ed2dbe80c8f5ab61671a Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Sat, 16 Mar 2024 20:59:18 +0100 Subject: [PATCH] Replace all site.Author* with site.Params.author*. --- layouts/micro/list.json.json | 8 ++++---- layouts/micro/rss.xml | 10 +++++----- layouts/partials/author-date.html | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/layouts/micro/list.json.json b/layouts/micro/list.json.json index a0aa79e..41a5382 100644 --- a/layouts/micro/list.json.json +++ b/layouts/micro/list.json.json @@ -3,7 +3,7 @@ { "version" : "https://jsonfeed.org/version/1", "title" : "Micro posts {{ i18n "string_on" }} {{ site.Title }}", - "description": "Micro blog {{ i18n "string_by" }} {{ with site.Author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}", + "description": "Micro blog {{ i18n "string_by" }} {{ with site.Params.author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}", "home_page_url" : "{{ site.BaseURL }}", {{ with .OutputFormats.Get "JSON" -}} "feed_url" : "{{ .Permalink }}", @@ -14,10 +14,10 @@ {{ with $.Param "favicon" -}} "favicon" : "{{ . | absURL }}", {{ end -}} - {{ with site.Author.name -}} + {{ with site.Params.author.name -}} "author" : { - "name" : "{{ . }}"{{ with site.Author.url }}, - "url": "{{ . }}"{{ end }}{{ with site.Author.avatar }}, + "name" : "{{ . }}"{{ with site.Params.author.url }}, + "url": "{{ . }}"{{ end }}{{ with site.Params.author.avatar }}, "avatar": "{{ . | absURL }}"{{ end }} }, {{ end -}} diff --git a/layouts/micro/rss.xml b/layouts/micro/rss.xml index 9d3904b..9013692 100644 --- a/layouts/micro/rss.xml +++ b/layouts/micro/rss.xml @@ -2,16 +2,16 @@ Micro posts {{ i18n "string_on" }} {{ site.Title }} {{ .Permalink }} - Micro blog {{ i18n "string_by" }} {{ with site.Author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }} + Micro blog {{ i18n "string_by" }} {{ with site.Params.author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }} Hugo -- gohugo.io {{ with site.LanguageCode -}} {{ . }} {{ end -}} - {{ with site.Author.email -}} - {{ . }}{{ with site.Author.name }} ({{ . }}){{ end }} + {{ with site.Params.author.email -}} + {{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }} {{ end -}} - {{ with site.Author.email -}} - {{ . }}{{ with site.Author.name }} ({{ . }}){{ end }} + {{ with site.Params.author.email -}} + {{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }} {{ end -}} {{ with site.Copyright -}} {{ . }} diff --git a/layouts/partials/author-date.html b/layouts/partials/author-date.html index eca4638..8122cdd 100644 --- a/layouts/partials/author-date.html +++ b/layouts/partials/author-date.html @@ -1,3 +1,3 @@ -{{ with $.Param "author" | default site.Author.name }}{{ end -}} -{{ if and .Date (or ($.Param "author") site.Author.name) }} - {{ end -}} +{{ with $.Param "author" | default site.Params.author.name }}{{ end -}} +{{ if and .Date (or ($.Param "author") site.Params.author.name) }} - {{ end -}} {{ with .Date }}{{ end }}