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

github.com/tummychow/lanyon-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBhavin Gandhi <bhavin7392@gmail.com>2018-11-08 11:30:55 +0300
committerBhavin Gandhi <bhavin7392@gmail.com>2020-03-28 21:09:11 +0300
commit0bfd561f44a8528e70da1f3dd4be3b0a846c1084 (patch)
treec61b07ff3f834b62ca4aa6399c2d8f88e666ca9c
parent1eaec964dfbd250d7e0c98fc6f06ecee43d95aeb (diff)
Remove whitespaces from sidebar
- As the loop iterates over all the pages keeping the whitespaces generated by range and if statements adds more than 100 lines in the HTML files - This removes those whitespaces Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
-rw-r--r--layouts/partials/sidebar.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 53936b3..43d3c7c 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -12,12 +12,12 @@
<a class="sidebar-nav-item {{ if .IsHome }} active {{ end }}" href="/">Home</a>
<a class="sidebar-nav-item {{ if eq .RelPermalink "/post/" }} active {{ end }}" href="/post">Posts</a>
- {{ $thisperma := .Permalink }}
- {{ range .Site.Pages.ByWeight }}
- {{ if isset .Params "sidebar" }}
+ {{- $thisperma := .Permalink }}
+ {{ range .Site.Pages.ByWeight -}}
+ {{ if isset .Params "sidebar" -}}
<a class="sidebar-nav-item {{ if eq .Permalink $thisperma }} active {{ end }}" href="{{ .Permalink }}">{{ .Title }}</a>
- {{ end }}
- {{ end }}
+ {{ end -}}
+ {{ end -}}
<a class="sidebar-nav-item" href="{{ .Site.Params.Github.Url }}/archive/{{ .Site.Params.Github.Head }}.zip">Download</a>
<a class="sidebar-nav-item" href="{{ .Site.Params.Github.Url }}">GitHub project</a>