Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiaoheiAh/hugo-theme-pure.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Ji <408776303@qq.com>2020-04-06 16:22:06 +0300
committerGitHub <noreply@github.com>2020-04-06 16:22:06 +0300
commit89c2f6ca881e4acf518e3635afcbd2bbad7ee8e8 (patch)
treeb599464767697fc71ee188e9b05e973e51428cb2
parentbc1c04f5ea21fdb5a6b3dd521ebd3aa36bf8a4cb (diff)
Feat: default display description
Default display description if description set.
-rw-r--r--layouts/index.html8
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">