Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/parsiya/Hugo-Octopress.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsiya@gmail.com <parsiya@gmail.com>2016-07-31 21:50:33 +0300
committerparsiya@gmail.com <parsiya@gmail.com>2016-07-31 21:50:33 +0300
commit16e73c1fde2317bebfb93b5942b572db4d5831e6 (patch)
tree6a665ed7541ebbad77b1d98e7955e1436301cc06 /layouts
parenta700f9a0cbb002abf0403700412eda26094aaed4 (diff)
Add control to make sidebar menu links open in a new window
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/sidebar.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 739d365..dd218af 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -39,7 +39,8 @@
</ul>
<!-- sidebar menu - items are read from the config file
- first we check if it is enabled in config file and then start adding the items -->
+ first we check if it is enabled in config file and then start adding the items
+ if Site.Params.sidebarNewWindow exists and is set to true then open these links in a new window -->
{{ if eq .Site.Params.sidebar_menu_enabled true }}
<section class="odd">
@@ -48,7 +49,7 @@
{{ end }}
{{ range .Site.Menus.sidebar }}
<li>
- <a href="{{ .URL | absURL }}" title="{{ .Name }}">{{ .Name }}</a>
+ <a href="{{ .URL | absURL }}" title="{{ .Name }}" {{ if eq $.Site.Params.sidebarNewWindow true }} target="_blank" {{ end }}>{{ .Name }}</a>
</li>
{{ end }}
</section>