summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Telange <21258296+adityatelange@users.noreply.github.com>2021-01-27 21:19:21 +0530
committerAditya Telange <21258296+adityatelange@users.noreply.github.com>2021-01-27 21:31:33 +0530
commit92573215477d7936989152e8f277d0f29d805dd9 (patch)
treec475757a60666e601b0c36b71d59aa836e3d136b
parenta414d16b86088fd6a3213a2fede6656571e05787 (diff)
Add description to other layouts
- helps adding description to sub-sections, search, terms, archive pages
-rw-r--r--layouts/_default/archives.html5
-rw-r--r--layouts/_default/list.html5
-rw-r--r--layouts/_default/search.html5
-rw-r--r--layouts/_default/terms.html7
4 files changed, 21 insertions, 1 deletions
diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html
index 22b5d9a..5daf2aa 100644
--- a/layouts/_default/archives.html
+++ b/layouts/_default/archives.html
@@ -2,6 +2,11 @@
<header class="page-header">
<h1>{{ .Title }}</h1>
+ {{- if .Description }}
+ <div class="post-description">
+ {{ .Description }}
+ </div>
+ {{- end }}
</header>
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 9d805c5..9518ebf 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -7,6 +7,11 @@
{{- if not .IsHome | and .Title }}
<header class="page-header">
<h1>{{ .Title }}</h1>
+ {{- if .Description }}
+ <div class="post-description">
+ {{ .Description }}
+ </div>
+ {{- end }}
</header>
{{- end }}
diff --git a/layouts/_default/search.html b/layouts/_default/search.html
index 0989432..4d0c415 100644
--- a/layouts/_default/search.html
+++ b/layouts/_default/search.html
@@ -8,6 +8,11 @@
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg>
</h1>
+ {{- if .Description }}
+ <div class="post-description">
+ {{ .Description }}
+ </div>
+ {{- end }}
{{- if not (.Param "hideMeta") }}
<div class="post-meta">
{{- if .IsTranslated -}}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index adbd2f5..b091987 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -3,6 +3,11 @@
{{- if .Title }}
<header class="page-header">
<h1>{{ .Title }}</h1>
+ {{- if .Description }}
+ <div class="post-description">
+ {{ .Description }}
+ </div>
+ {{- end }}
</header>
{{- end }}
@@ -19,4 +24,4 @@
{{- end }}
</ul>
-{{ end }}{{/* end main */}} \ No newline at end of file
+{{ end }}{{/* end main */}}