add param sectionsWithFullContentOnListPage
This commit is contained in:
parent
2483e4b593
commit
a72767da4a
@ -11,6 +11,7 @@ Anubis is a simple minimalist theme for [Hugo blog engine](https://gohugo.io/).
|
|||||||
- Dark mode (automatic / by switcher)
|
- Dark mode (automatic / by switcher)
|
||||||
- Pagination
|
- Pagination
|
||||||
- Multiple taxonomies: tags, categories, authors
|
- Multiple taxonomies: tags, categories, authors
|
||||||
|
- Multiple sections: posts, notes, etc with customization
|
||||||
- Archive
|
- Archive
|
||||||
- Table of Contents
|
- Table of Contents
|
||||||
- Open Graph and Twitter Cards support
|
- Open Graph and Twitter Cards support
|
||||||
@ -97,6 +98,8 @@ params:
|
|||||||
dateFormat: "2006-01-02"
|
dateFormat: "2006-01-02"
|
||||||
paginationSinglePost: true
|
paginationSinglePost: true
|
||||||
style: light-without-switcher
|
style: light-without-switcher
|
||||||
|
mainSections: [ "posts" ] # which sections should be on index/main page
|
||||||
|
sectionsWithFullContentOnListPage: [ "notes" ] # for which sections content should be displayed on list pages
|
||||||
readMore: false # show read more button
|
readMore: false # show read more button
|
||||||
readNextPosts: 5 # show 5 related posts, 0 by default
|
readNextPosts: 5 # show 5 related posts, 0 by default
|
||||||
disableSummary: false
|
disableSummary: false
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
|
|
||||||
<div class="articles h-feed">
|
<div class="articles h-feed">
|
||||||
<h1 class="post-title">{{ i18n .Title }}</h1>
|
<h1 class="post-title">{{ i18n .Title }}</h1>
|
||||||
{{ $pages := where (where .Pages "Type" "in" site.Params.mainSections) "Params.hidden" "!=" true}}
|
{{ $showFullContent := in .Site.Params.sectionsWithFullContentOnListPage .Section }}
|
||||||
|
{{ $pages := where .Pages "Params.hidden" "!=" true}}
|
||||||
{{ range $pages }}
|
{{ range $pages }}
|
||||||
<div class="post-short-list h-entry">
|
<div class="post-short-list h-entry">
|
||||||
<div class="post-header">
|
<div class="post-header">
|
||||||
@ -14,6 +15,9 @@
|
|||||||
{{ partial "post-language-switcher.html" . }}
|
{{ partial "post-language-switcher.html" . }}
|
||||||
</header>
|
</header>
|
||||||
</div>
|
</div>
|
||||||
|
{{ if $showFullContent }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ end }}
|
||||||
{{ partial "post-info.html" . }}
|
{{ partial "post-info.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user