Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ weight = 4
* show all posts

```toml
paginate = 15 # 15 posts per page

[params]
showAllPostsOnHomePage = true
postsOnHomePage = 5 # this option will be ignored
Expand Down
2 changes: 2 additions & 0 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

<section id="writing">
<span class="h1"><a href="{{ .Site.Params.mainSection | absURL }}">{{ .Site.Params.mainSectionTitle | default "Writings" }}</a></span>
{{ if ne (len .Site.Taxonomies) 0 }}
{{ if (and (and (isset .Site.Params "tagsoverview") (eq .Site.Params.tagsOverview true)) (gt (len .Site.Taxonomies.tags) 0)) }}
<span class="h2">Topics</span>
<span class="widget tagcloud">
Expand All @@ -51,6 +52,7 @@
</span>
<span class="h2">Most recent</span>
{{ end }}
{{ end }}

{{ $showAllPostsOnHomePage := false }}
{{ if (isset .Site.Params "showallpostsonhomepage") }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/posts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1 class="posttitle" itemprop="name headline">
{{ $readTime }} minute read
</div>
{{ end }}
{{ if gt .Params.categories 0 }}
{{ if (and (isset .Site.Taxonomies "categories") (gt .Params.categories 0)) }}
<div class="article-category">
<i class="fas fa-archive"></i>
{{ range $index, $value := .Params.categories }}
Expand All @@ -47,7 +47,7 @@ <h1 class="posttitle" itemprop="name headline">
{{ end }}
</div>
{{ end }}
{{ if gt .Params.tags 0 }}
{{ if (and (isset .Site.Taxonomies "tags") (gt .Params.tags 0)) }}
<div class="article-tag">
<i class="fas fa-tag"></i>
{{ range $index, $value := .Params.tags }}
Expand Down