Skip to content

Commit

Permalink
Add description to other layouts
Browse files Browse the repository at this point in the history
- helps adding description to sub-sections,
  search, terms, archive pages
  • Loading branch information
adityatelange committed Jan 27, 2021
1 parent a414d16 commit 9257321
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
5 changes: 5 additions & 0 deletions layouts/_default/archives.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
5 changes: 5 additions & 0 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
5 changes: 5 additions & 0 deletions layouts/_default/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ <h1>{{ .Title }}
<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 -}}
Expand Down
7 changes: 6 additions & 1 deletion layouts/_default/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
{{- if .Title }}
<header class="page-header">
<h1>{{ .Title }}</h1>
{{- if .Description }}
<div class="post-description">
{{ .Description }}
</div>
{{- end }}
</header>
{{- end }}

Expand All @@ -19,4 +24,4 @@ <h1>{{ .Title }}</h1>
{{- end }}
</ul>

{{ end }}{{/* end main */}}
{{ end }}{{/* end main */}}

0 comments on commit 9257321

Please sign in to comment.