diff options
author | Yang Ji <408776303@qq.com> | 2020-04-06 16:22:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-06 16:22:06 +0300 |
commit | 89c2f6ca881e4acf518e3635afcbd2bbad7ee8e8 (patch) | |
tree | b599464767697fc71ee188e9b05e973e51428cb2 | |
parent | bc1c04f5ea21fdb5a6b3dd521ebd3aa36bf8a4cb (diff) |
Feat: default display description
Default display description if description set.
-rw-r--r-- | layouts/index.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/index.html b/layouts/index.html index 69bf2b6..6cd7fd6 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -16,9 +16,13 @@ {{ partial "post/title.html" . -}} {{- .Scratch.Delete "class_name"}} </div> - {{- if .Summary }} + {{- if .Description }} <div class="article-entry text-muted" itemprop="description"> - {{- .Summary -}} + {{- .Description -}} + </div> + {{ else if .Summary }} + <div class="article-entry text-muted" itemprop="description"> + {{ .Summary }} </div> {{- end }} <p class="article-meta"> |