summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeichen Liu <weichl@hotmail.com>2021-01-02 09:00:20 -0800
committerGitHub <noreply@github.com>2021-01-02 22:30:20 +0530
commit946cc1ffe35dbf5fcac4f5e2a636592110953610 (patch)
tree6fe312098d5da4c74d131583410736cd66099aaa
parent5d6de5ecb1febac645b56cca7596ad0ce2ab9054 (diff)
single: Add post description (#165)
usage => in post params add : description: "Desc Text."
-rw-r--r--assets/css/post-single.css5
-rw-r--r--layouts/_default/single.html3
2 files changed, 8 insertions, 0 deletions
diff --git a/assets/css/post-single.css b/assets/css/post-single.css
index 393a86a..0282d50 100644
--- a/assets/css/post-single.css
+++ b/assets/css/post-single.css
@@ -8,6 +8,11 @@
transform: translateX(-2px)
}
+.post-description {
+ margin-top: 10px;
+ margin-bottom: 5px;
+}
+
.post-meta {
color: var(--secondary);
font-size: 14px;
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 21e8e79..0f1480b 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -6,6 +6,9 @@
{{ .Title }}
{{- if .Draft }}<div class="entry-isdraft"><sup>&nbsp;&nbsp;[draft]</sup></div>{{- end }}
</h1>
+ <div class="post-description">
+ {{ .Description }}
+ </div>
{{- if .Params.hideMeta }}{{ else }}
<div class="post-meta">
{{- partial "post_meta.html" . -}}