Skip to content

Commit d1d8184

Browse files
author
Joshua Boniface
committed
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.
1 parent 2ae407d commit d1d8184

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

assets/css/components/_post.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
color: $lightest-color;
33
}
44

5+
.post-description {
6+
color: $lightest-color;
7+
font-style: italic;
8+
}
9+
510
.post-meta > div {
611
display: flex;
712
align-items: center;

layouts/_default/single.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
<article class="post">
33
<header class="post-header">
44
<h1 class ="post-title">{{ .Title }}</h1>
5+
{{- if .Description }}
6+
<h4 class ="post-description">{{ .Description }}</h4>
7+
{{- end }}
58
{{- if ne .Type "page" }}
69
<div class="post-meta">
710
<div>

0 commit comments

Comments
 (0)