feat: add support for hiding "Recent posts" block
This commit is contained in:
@@ -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.
|
# 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
|
# 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.
|
Contributions are welcome. Please refer to the [contributions guidelines](https://github.com/aubm/hugo-code-editor-theme/blob/master/CONTRIBUTING.md) for more information.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<nav class="col-md-3">
|
<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>
|
<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">
|
<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>
|
<h3 data-open="last-posts">{{ .Site.Title }} - {{ ( index $.Site.Data.translations (default $.Site.Params.locale "en-US") ).mostrecentposts }}</h3>
|
||||||
@@ -8,6 +9,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Site.Taxonomies.tags }}
|
{{ with .Site.Taxonomies.tags }}
|
||||||
<div id="tags" class="open">
|
<div id="tags" class="open">
|
||||||
|
|||||||
Reference in New Issue
Block a user