Root link in menu configurable

This commit is contained in:
cfchou 2017-07-06 00:47:49 +08:00 committed by Aurélien Baumann
parent 8666ec20a6
commit 7e7f246b3b
2 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,8 @@ theme = "code-editor"
[params]
author = "John Doe"
locale = "en-US"
# rootlink = "/"
# rootlink specifies where Root in menu.html links to. If it's not set then baseurl will be used.
```
# Contributing

View File

@ -1,5 +1,5 @@
<nav class="col-md-3">
<h3 class="home-link"><a href="/">{{ ( index $.Site.Data.translations $.Site.Params.locale ).root }}</a></h3>
<h3 class="home-link"><a href="{{ index .Site.Params "rootlink" | default .Site.BaseURL }}">{{ ( index $.Site.Data.translations $.Site.Params.locale ).root }}</a></h3>
<div id="last-posts" class="open">
<h3 data-open="last-posts">{{ .Site.Title }} - {{ ( index $.Site.Data.translations $.Site.Params.locale ).mostrecentposts }}</h3>
<ul>