update required hugo min version to v0.65
This commit is contained in:
parent
e0f69f1cf7
commit
ea44ee3860
13 changed files with 73 additions and 76 deletions
|
@ -1,35 +1,33 @@
|
|||
{{ $tocLevels := default (default 6 .Site.Params.GeekdocToC) .Page.Params.GeekdocToC }}
|
||||
|
||||
{{ if $tocLevels }}
|
||||
<div class="gdoc-toc gdoc-toc__level--{{$tocLevels}}">
|
||||
{{ template "toc-tree" dict "sect" .Page.Pages }}
|
||||
</div>
|
||||
<div class="gdoc-toc gdoc-toc__level--{{$tocLevels}}">
|
||||
{{ template "toc-tree" dict "sect" .Page.Pages }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<!-- templates -->
|
||||
{{ define "toc-tree" }}
|
||||
<ul>
|
||||
{{ range .sect.GroupBy "Weight" }}
|
||||
{{ range .ByTitle }}
|
||||
{{ if not .Params.geekdocHidden }}
|
||||
<li>
|
||||
{{ if or .Content .Params.geekdocFlatSection }}
|
||||
<span>
|
||||
<a href="{{ .RelPermalink }}" class="gdoc-toc__entry">
|
||||
{{ partial "title" . }}
|
||||
</a>
|
||||
</span>
|
||||
{{ else }}
|
||||
<span>{{ partial "title" . }}</span>
|
||||
{{ end }}
|
||||
<ul>
|
||||
{{ range .sect.GroupBy "Weight" }}
|
||||
{{ range .ByTitle }}
|
||||
{{ if not .Params.geekdocHidden }}
|
||||
<li>
|
||||
{{ if or .Content .Params.geekdocFlatSection }}
|
||||
<span>
|
||||
<a href="{{ .RelPermalink }}" class="gdoc-toc__entry">{{ partial "title" . }}</a>
|
||||
</span>
|
||||
{{ else }}
|
||||
<span>{{ partial "title" . }}</span>
|
||||
{{ end }}
|
||||
|
||||
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
||||
{{ if and (ne $numberOfPages 0) (not .Params.geekdocFlatSection) }}
|
||||
{{ template "toc-tree" dict "sect" .Pages }}
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
||||
{{ if and (ne $numberOfPages 0) (not .Params.geekdocFlatSection) }}
|
||||
{{ template "toc-tree" dict "sect" .Pages }}
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue