Replace deprecated variables .Hugo and .UniqueID with hugo and .File.UniqueID.
This commit is contained in:
parent
57f5e51ce0
commit
6907412c20
1 changed files with 17 additions and 13 deletions
|
|
@ -1,11 +1,13 @@
|
|||
{{ $currentID := .UniqueID }}
|
||||
{{ $currentSection := .Section -}}
|
||||
{{ $currentID := "" -}}
|
||||
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
|
||||
<aside class="sidebar layout__second-sidebar">
|
||||
{{ range $.Site.Home.Sections -}}
|
||||
<section>
|
||||
<h4 class="menu"><a class="{{ if eq $currentID .UniqueID }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></h4>
|
||||
<h4 class="menu"><a class="{{ if eq $currentSection .Section }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></h4>
|
||||
<ul class="menu">
|
||||
{{ range .Pages -}}
|
||||
<li><a class="{{ if eq $currentID .UniqueID }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
<li><a class="{{ if eq $currentID .File.UniqueID }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Reference in a new issue