feat: add support for hiding "Recent posts" block

This commit is contained in:
luto 2018-11-02 21:34:10 +01:00 committed by Aurélien Baumann
parent 509e3a2dc6
commit c4f5e4ade9
2 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,10 @@ theme = "code-editor"
# rootlink specifies where Root in menu.html links to. If it's not set then baseurl will be used.
```
In addition to the required settings, you can customize this theme using the following keys within `[params]`:
* `codeeditor_menu_mostrecentposts`, defaults to `true`, whether to show the "Most recent posts" section within the menu
# Contributing
Contributions are welcome. Please refer to the [contributions guidelines](https://github.com/aubm/hugo-code-editor-theme/blob/master/CONTRIBUTING.md) for more information.

View File

@ -1,4 +1,5 @@
<nav class="col-md-3">
{{ if $.Site.Params.codeeditor_menu_mostrecentposts | default true }}
<h3 class="home-link"><a href="{{ index .Site.Params "rootlink" | default .Site.BaseURL }}">{{ ( index $.Site.Data.translations (default $.Site.Params.locale "en-US") ).root }}</a></h3>
<div id="last-posts" class="open">
<h3 data-open="last-posts">{{ .Site.Title }} - {{ ( index $.Site.Data.translations (default $.Site.Params.locale "en-US") ).mostrecentposts }}</h3>
@ -8,6 +9,7 @@
{{ end }}
</ul>
</div>
{{ end }}
{{ with .Site.Taxonomies.tags }}
<div id="tags" class="open">