diff --git a/CHANGELOG.md b/CHANGELOG.md index 94bb45bd..814c5cb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - KaTeX support using `katex` shortcode - Dark mode toggle with new theme parameters for managing light/dark appearance - French translation ([#18](https://github.com/jpanther/congo/pull/18)) +- Author bio in article footer - Grouping by year can now be specificed in front matter on list pages ### Changed diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 71794fb9..4a692ca6 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -2088,6 +2088,10 @@ body a, body button { justify-content: space-between; } +.place-self-center { + place-self: center; +} + .overflow-hidden { overflow: hidden; } @@ -2586,6 +2590,10 @@ body a, body button { color: var(--color-neutral-300); } +.dark .dark\:text-neutral-400 { + color: var(--color-neutral-400); +} + .dark .dark\:text-primary-400 { color: var(--color-primary-400); } diff --git a/config/_default/config.toml b/config/_default/config.toml index 1606695c..d49c3013 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -17,6 +17,7 @@ summaryLength = 0 [author] # name = "Your name here" # image = "img/author.jpg" + # bio = "A little bit about you" # links = [ # { email = "mailto:hello@your_domain.com" }, # { link = "https://link-to-some-website.com/" }, diff --git a/exampleSite/config.toml b/exampleSite/config.toml index de6461ab..bccba71d 100755 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -17,6 +17,7 @@ summaryLength = 0 [author] name = "Congo" image = "img/author.jpg" + bio = "This is an example author bio, and although there's a stock photo of a dog here, this article was actually created by a human. :dog:" links = [ { twitter = "https://twitter.com/" }, { facebook = "https://facebook.com/" }, diff --git a/exampleSite/content/docs/configuration.md b/exampleSite/content/docs/configuration.md index 4303d4e2..5113c5d1 100644 --- a/exampleSite/content/docs/configuration.md +++ b/exampleSite/content/docs/configuration.md @@ -41,6 +41,7 @@ Note that the variable names provided in this table use dot notation to simplify |`summaryLength`|integer|`0`|The number of words that are used to generate the article summary when one is not provided in the [front matter]({{< ref "front-matter" >}}). A value of `0` will use the first sentence. This value has no effect when summaries are hidden.| |`author.name`|string|_Not set_|The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used.| |`author.image`|string|_Not set_|Path to the image file of the author. The image should be a 1:1 aspect ratio and placed in the site's `static/` folder.| +|`author.bio`|string|_Not set_|A Markdown string containing the author's bio. It will be displayed in article footers.| |`author.links`|array of objects|_Not set_|The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`.| |`permalinks`||_Not set_|Refer to the [Hugo docs](https://gohugo.io/content-management/urls/#permalinks) for permalink configuration.| |`taxonomies`||_Not set_|Refer to the [Organising content]({{< ref "getting-started#organising-content" >}}) section for taxonomy configuration.| diff --git a/exampleSite/content/docs/getting-started.md b/exampleSite/content/docs/getting-started.md index 85dfb361..f68483d6 100644 --- a/exampleSite/content/docs/getting-started.md +++ b/exampleSite/content/docs/getting-started.md @@ -23,8 +23,9 @@ languageCode = "en-AU" title = "My awesome website" [author] -name = "Your name" +name = "My name" image = "img/author.jpg" +bio = "A little bit about me" links = [ { twitter = "https://twitter.com/username" } ] diff --git a/layouts/partials/author.html b/layouts/partials/author.html index 5d8ef426..5f073d86 100644 --- a/layouts/partials/author.html +++ b/layouts/partials/author.html @@ -1,9 +1,9 @@ {{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }} -
+
{{ with .Site.Author.image }} {{ end }} -
+
{{ with .Site.Author.name | markdownify | emojify }}
{{ i18n "author.byline_title" | markdownify | emojify }} @@ -12,6 +12,9 @@ {{ . }}
{{ end }} + {{ with .Site.Author.bio | markdownify | emojify }} +
{{ . }}
+ {{ end }} {{ partialCached "author-links.html" . }}