From 946cc1ffe35dbf5fcac4f5e2a636592110953610 Mon Sep 17 00:00:00 2001 From: Weichen Liu Date: Sat, 2 Jan 2021 09:00:20 -0800 Subject: [PATCH] single: Add post description (#165) usage => in post params add : description: "Desc Text." --- assets/css/post-single.css | 5 +++++ layouts/_default/single.html | 3 +++ 2 files changed, 8 insertions(+) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 393a86ac..0282d501 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 21e8e793..0f1480bd 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -6,6 +6,9 @@ {{ .Title }} {{- if .Draft }}
  [draft]
{{- end }} +
+ {{ .Description }} +
{{- if .Params.hideMeta }}{{ else }}
{{- partial "post_meta.html" . -}}