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,13 +1,14 @@
|
|||
{{ $home := relLangURL "/" }}
|
||||
{{ $currentSection := .Section }}
|
||||
{{ $currentID := .UniqueID }}
|
||||
{{ $home := relLangURL "/" -}}
|
||||
{{ $currentSection := .Section -}}
|
||||
{{ $currentID := "" -}}
|
||||
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
|
||||
<nav class="main-menu layout__navigation">
|
||||
<h2 class="visually-hidden">{{ i18n "menu_title" }}</h2>
|
||||
<ul class="navbar">
|
||||
<li><a class="{{ if .IsHome }}active{{ end }}" href="{{ $home }}">{{ i18n "menu_home" }}</a></li>
|
||||
{{ range where .Site.Pages "Section" "" -}}
|
||||
{{ if ne .RelPermalink (string $home) -}}
|
||||
<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 -}}
|
||||
{{ end -}}
|
||||
{{ range $.Site.Home.Sections -}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue