Commit eb3c3c13 by sbiego

lang relative links

parent 1eef1d5e
{{ if .Site.Params.widgets.categories }}
{{ if isset .Site.Taxonomies "categories" }}
{{ if not (eq (len .Site.Taxonomies.categories) 0) }}
<div class="panel panel-default sidebar-menu">
<div class="panel-heading">
<h3 class="panel-title">{{ i18n "categoriesTitle" }}</h3>
</div>
<div class="panel-body">
<ul class="nav nav-pills nav-stacked">
{{ range $name, $items := .Site.Taxonomies.categories }}
<!-- <li><a href="{{ $.Site.BaseURL }}categories/{{ $name | urlize | lower }}">{{ $name }} ({{ len $items }})</a> -->
<li><a href="{{ $.Site.BaseURL }}{{ $.Site.Language.Lang }}/categories/{{ $name | urlize | lower }}">{{ $name }} ({{ len $items }})</a>
</li>
{{ end }}
</ul>
</div>
</div>
{{ end }}
{{ end }}
{{ end }}
{{ if .Site.Params.widgets.tags }}
{{ if isset .Site.Taxonomies "tags" }}
{{ if not (eq (len .Site.Taxonomies.tags) 0) }}
<div class="panel sidebar-menu">
<div class="panel-heading">
<h3 class="panel-title">{{ i18n "tagsTitle" }}</h3>
</div>
<div class="panel-body">
<ul class="tag-cloud">
{{ range $name, $items := .Site.Taxonomies.tags }}
<!-- <li><a href="{{ $.Site.BaseURL }}tags/{{ $name | urlize | lower }}"><i class="fa fa-tags"></i> {{ $name }}</a> -->
<li><a href="{{ $.Site.BaseURL }}{{ $.Site.Language.Lang }}/tags/{{ $name | urlize | lower }}"><i class="fa fa-tags"></i> {{ $name }}</a>
</li>
{{ end }}
</ul>
</div>
</div>
{{ end }}
{{ end }}
{{ end }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment