From 6ef5e3685adf2b46c0f64278c4f678437fea5ce0 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Mon, 27 Nov 2023 20:15:26 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Move=20`author`=20to=20`params.a?= =?UTF-8?q?uthor`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 +++++- README.md | 6 +++--- config.toml | 4 +++- exampleSite/config.toml | 2 +- layouts/index.html | 10 +++++----- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3482094..94a546e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -All notable changes to this project will be documented in this file. +All notable changes to Lynx will be documented in this file. Things that need particular attention when upgrading from a prior version are marked ⚠️. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Support for Spotify and Threads - Support for X (Twitter) ([#107](https://github.com/jpanther/lynx/pull/107)) +### Changed + +- ⚠️ Author param block in site config moved to `params.author` to align with recent deprecations in the Hugo project + ## [1.3.1] - 2023-09-10 ### Changed diff --git a/README.md b/README.md index 81695f5..08b0d94 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Lynx is designed to be a simple links page powered by [Hugo](https://gohugo.io). It's built using Tailwind CSS and inspired by services like LinkTree. -🌏 [Demo site](https://jpanther.github.io/lynx/) -🐛 [Bug reports & issues](https://github.com/jpanther/lynx/issues) +🌏 [Demo site](https://jpanther.github.io/lynx/) +🐛 [Bug reports & issues](https://github.com/jpanther/lynx/issues) 💡 [Questions & feature requests](https://github.com/jpanther/lynx/discussions) ![Screenshot](https://raw.githubusercontent.com/jpanther/lynx/stable/images/screenshot.png) @@ -71,7 +71,7 @@ Acceptable link parameters are: - `title` = the HTML title of the link ```toml -[author] +[params.author] links = { # Simple link { github = "https://github.com/jpanther/lynx" } diff --git a/config.toml b/config.toml index 4d9ec53..4c9a825 100644 --- a/config.toml +++ b/config.toml @@ -8,7 +8,7 @@ title = "Lynx" enableEmoji = true disableKinds = ["taxonomy", "term"] -[author] +[params.author] # name = "Your name here" # headline = "An awesome person" # image = "img/author.jpg" # path relative to static directory @@ -42,10 +42,12 @@ disableKinds = ["taxonomy", "term"] # { slack = "https://workspace.url/team/userid" }, # { snapchat = "https://snapchat.com/add/username" }, # { soundcloud = "https://soundcloud.com/username" }, + # { spotify = "https://spotify.com/user/username" }, # { stack-exchange = "https://stackexchange.com/users/userid/username" }, # { stack-overflow = "https://stackoverflow.com/users/userid/username" }, # { steam = "https://steamcommunity.com/profiles/userid" }, # { telegram = "https://t.me/username" }, + # { threads = "https://threads.com/username" }, # { tiktok = "https://tiktok.com/@username" }, # { tumblr = "https://username.tumblr.com" }, # { twitch = "https://twitch.tv/username" }, diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 93553c0..ff8ef8e 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -4,7 +4,7 @@ title = "Lynx" enableEmoji = true disableKinds = ["taxonomy", "term"] -[author] +[params.author] name = "Lynx" headline = "A simple links theme for Hugo built with Tailwind CSS" image = "author.jpg" diff --git a/layouts/index.html b/layouts/index.html index 52e903c..0269dd8 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,7 +1,7 @@ {{ define "main" }}
- {{ with .Site.Author.image }} + {{ with .Site.Params.Author.image }} {{ $src := . }} {{ $resource := "" }} {{ if $.Page.Resources.GetMatch $src }} @@ -16,14 +16,14 @@ class="mb-2 rounded-full h-36 w-36" width="144" height="144" - alt="{{ $.Site.Author.name | default "Author" }}" + alt="{{ $.Site.Params.Author.name | default "Author" }}" src="{{ $src }}" /> {{ end }}

- {{ .Params.title | default .Site.Author.name | default .Site.Title | emojify }} + {{ .Params.title | default .Site.Params.Author.name | default .Site.Title | emojify }}

- {{ with .Site.Author.headline }} + {{ with .Site.Params.Author.headline }}

{{ . | markdownify | emojify }}

@@ -32,7 +32,7 @@
{{ . | emojify }}
{{ end }}
- {{ with .Site.Author.links }} + {{ with .Site.Params.Author.links }}
{{ range $links := . }} {{ range $type, $data := $links }}