From d1d81843f2c0017a2eb183faa7d847a2acf7745d Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Fri, 27 Jan 2023 03:13:56 -0500 Subject: [PATCH] Add support for post descriptions Adds support for post descriptions, i.e. subtitles. These are presented in an italicized h4 header under the post title if present in the Hugo post configuration. --- assets/css/components/_post.scss | 5 +++++ layouts/_default/single.html | 3 +++ 2 files changed, 8 insertions(+) diff --git a/assets/css/components/_post.scss b/assets/css/components/_post.scss index c10cb8c1..30232b50 100644 --- a/assets/css/components/_post.scss +++ b/assets/css/components/_post.scss @@ -2,6 +2,11 @@ color: $lightest-color; } +.post-description { + color: $lightest-color; + font-style: italic; +} + .post-meta > div { display: flex; align-items: center; diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 30da5005..c8ef490b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,6 +2,9 @@

{{ .Title }}

+ {{- if .Description }} +

{{ .Description }}

+ {{- end }} {{- if ne .Type "page" }}