From 5e8f1c5b3015ffa82a7804c5c5ce231fc2178ac4 Mon Sep 17 00:00:00 2001
From: Ethan Yoo
Date: Thu, 19 Sep 2024 16:42:40 -0400
Subject: [PATCH] Update Hugo's configuration and usage of custom parameters
---
hugo.toml | 22 +++++++++---------
layouts/index.html | 24 ++++++++++----------
themes/geronimo/layouts/_default/baseof.html | 8 ++++---
themes/geronimo/layouts/_default/index.json | 6 ++---
themes/geronimo/layouts/_default/rss.xml | 10 ++++----
themes/geronimo/layouts/partials/footer.html | 2 +-
themes/geronimo/theme.toml | 2 +-
7 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/hugo.toml b/hugo.toml
index 7851378..1cf9848 100644
--- a/hugo.toml
+++ b/hugo.toml
@@ -41,21 +41,21 @@ title = "Ethan Yoo"
# Parameters
[params]
- author = "Ethan Yoo"
- authorEmail = "hello@ethanyoo.com"
- authorGitLab = "https://framagit.org/ethan"
- authorGitea = "https://git.eyoo.link/ethan"
- authorLetterboxd = "https://letterboxd.com/ethanyoo/stats/"
- authorLinkedIn = "https://www.linkedin.com/in/ethanyoo/"
- authorMastodon = "https://todon.eu/@ethanyoo"
- authorPronouns = "he/him/his"
- authorWriteFreely = "https://ethan.writeas.com/"
copyrightMessage = "Please support free culture by using Creative Commons licenses."
dateFmt = "2006-01-02 15:04 MST"
- description = "Ethan Yoo is a data analyst and researcher with a particular interest in topics related to disability, health equity, and social policy."
+ description = "Ethan Yoo is a data analyst and researcher with a particular interest in topics related to climate change, disability, and social policy."
license = "https://creativecommons.org/licenses/by-sa/4.0/"
- subtitle = "Pronouns: he/him/his"
+ subtitle = "Pronouns: he/him"
webmentionService = "https://webmention.io/ethanyoo.com/webmention"
+ [params.author]
+ name = "Ethan Yoo"
+ email = "hello@ethanyoo.com"
+ Gitea = "https://git.eyoo.link/ethan"
+ GitLab = "https://framagit.org/ethan"
+ Letterboxd = "https://letterboxd.com/ethanyoo/stats/"
+ LinkedIn = "https://www.linkedin.com/in/ethanyoo/"
+ Mastodon = "https://todon.eu/@ethanyoo"
+ pronouns = "he/him"
[menu]
diff --git a/layouts/index.html b/layouts/index.html
index b77bbdd..a694fe8 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -13,7 +13,7 @@
https://microformats.org/wiki/microformats2#authoring
-->
- {{ .Site.Params.author }}
+ {{ .Site.Params.author.name }}
Pronouns:
- {{ .Site.Params.authorPronouns }}
+ {{ .Site.Params.author.pronouns }}
I am a data enthusiast skilled in data management, qualitative and
@@ -34,7 +34,7 @@
class="u-photo photo"
src="/me.jpg"
alt="Photo of an East Asian man wearing a dark gray suit and a floral tie"
- title="{{ .Site.Params.author }}"
+ title="{{ .Site.Params.author.name }}"
/>
My guiding principles draw from disability justice and the ethics of care;
@@ -59,10 +59,10 @@
📚 You can browse my recommended resources.
Elsewhere
-
+
LinkedIn
-
+
Letterboxd
@@ -81,16 +81,16 @@
- Contact me .
+ Contact me .
Privacy .
Public key
- (Keyoxide) .
+ (Keyoxide) .
@@ -107,7 +107,7 @@
{{ "" | safeHTML }}
-
-
-
-{{- end }}
\ No newline at end of file
+
+
+
+{{- end }}
diff --git a/themes/geronimo/layouts/_default/baseof.html b/themes/geronimo/layouts/_default/baseof.html
index bd9ed1a..e46706e 100644
--- a/themes/geronimo/layouts/_default/baseof.html
+++ b/themes/geronimo/layouts/_default/baseof.html
@@ -1,9 +1,11 @@
-{{ .Title }} | {{ .Site.Title }}
-{{ with .Site.Params.author }} {{ end }}
+
+{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} from {{ end }}{{ .Site.Title }}{{ end }}
+
+{{ with .Site.Params.author.name }} {{ end }}
{{ with .Params.date }} {{ else }} {{end}}
-{{- with .Description }} {{ else }} {{- end }}
+{{- with .Description }} {{ else }} {{- end }}
{{- with .RelPermalink }} {{- end }}
diff --git a/themes/geronimo/layouts/_default/index.json b/themes/geronimo/layouts/_default/index.json
index 7a62ac0..7fe95af 100644
--- a/themes/geronimo/layouts/_default/index.json
+++ b/themes/geronimo/layouts/_default/index.json
@@ -4,12 +4,12 @@
{{ if .Params.dateCreated }}
{{ $.Scratch.Set "date" (.Params.dateCreated) }}
{{ else }}
- {{- if isset site.Params "date_format" -}}
- {{- $.Scratch.Set "date" (.Date.Format site.Params.date_format) -}}
+ {{- if isset site.Params "dateFmt" -}}
+ {{- $.Scratch.Set "date" (.Date.Format .Site.Params.dateFmt) -}}
{{- else -}}
{{- $.Scratch.Set "date" (.Date.Format "2006-01-02") -}}
{{- end -}}
{{ end }}
{{- $index = $index | append (dict "title" ( .Title | plainify ) "permalink" .Permalink "tags" .Params.tags "description" (.Params.description | markdownify | htmlUnescape | plainify) "date" ($.Scratch.Get "date") ) -}}
{{- end -}}
-{{- $index | jsonify -}}
\ No newline at end of file
+{{- $index | jsonify -}}
diff --git a/themes/geronimo/layouts/_default/rss.xml b/themes/geronimo/layouts/_default/rss.xml
index 025f615..55b5171 100644
--- a/themes/geronimo/layouts/_default/rss.xml
+++ b/themes/geronimo/layouts/_default/rss.xml
@@ -17,10 +17,8 @@
{{ .Permalink }}
Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}
Hugo -- gohugo.io {{ with .Site.LanguageCode }}
- {{.}} {{end}}{{ with .Site.Author.email }}
- {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} {{end}}{{ with .Site.Author.email }}
- {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} {{end}}{{ with .Site.Copyright }}
- {{.}} {{end}}{{ if not .Date.IsZero }}
+ {{.}} {{end}}
+ {{ with .Site.Copyright }}{{.}} {{end}}{{ if not .Date.IsZero }}
{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 MST" | safeHTML }} {{ end }}
{{- with .OutputFormats.Get "RSS" -}}
{{ printf " " .Permalink .MediaType | safeHTML }}
@@ -29,8 +27,8 @@
-
{{ .Title }}
{{ .Permalink }}
- {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 MST" | safeHTML }}
- {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} {{end}}
+ {{ .Date.Format "Monday, January 2, 2006 15:04:05 MST" | safeHTML }}
+ {{ .Site.Params.author.email }}
{{ .Permalink }}
{{ .Content | html }}
diff --git a/themes/geronimo/layouts/partials/footer.html b/themes/geronimo/layouts/partials/footer.html
index d796548..617fb75 100644
--- a/themes/geronimo/layouts/partials/footer.html
+++ b/themes/geronimo/layouts/partials/footer.html
@@ -5,5 +5,5 @@
{{- end }}
-
+
diff --git a/themes/geronimo/theme.toml b/themes/geronimo/theme.toml
index bcc7397..6a6026d 100644
--- a/themes/geronimo/theme.toml
+++ b/themes/geronimo/theme.toml
@@ -5,7 +5,7 @@ description = "Hugo theme based on smol"
homepage = "https://git.eyoo.link/ethan/geronimo"
tags = []
features = []
-min_version = "0.41.0"
+min_version = "0.134.0"
[author]
name = "Ethan Yoo"