Skip to content

Commit

Permalink
Make a config option for "Latest Posts" on content pages
Browse files Browse the repository at this point in the history
  • Loading branch information
BBaoVanC committed May 5, 2022
1 parent 5661000 commit 034ef46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions exampleSite/config.yaml
Expand Up @@ -42,6 +42,9 @@ params:
# reddit: true
# telegram: true

# show "Latest Posts" section at bottom of content pages
# latestPostsOnContent: true

# footer: >-
# Some example text for the footer.

Expand Down
4 changes: 3 additions & 1 deletion layouts/_default/single.html
Expand Up @@ -89,5 +89,7 @@ <h1>{{ i18n "related_posts" }}</h1>
</div>
{{ end }}

{{ partialCached "latest-posts.html" . }}
{{ if .Site.Params.latestPostsOnContent }}
{{ partialCached "latest-posts.html" . }}
{{ end }}
{{ end }}

0 comments on commit 034ef46

Please sign in to comment.