Fix filter on range

This commit is contained in:
Justin Nguyen 2020-12-22 10:23:26 -08:00
parent 0871dee992
commit d6be608202

View File

@ -20,17 +20,16 @@
<div class="sections"> <div class="sections">
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ if in (first 2 .URL) "#" }}
<div id="{{ .Identifier }}" class="posts section"> <div id="{{ .Identifier }}" class="posts section">
<h1 class="section-header">{{ .Name }}</h1> <h1 class="section-header">{{ .Name }}</h1>
{{ if ne .Identifier $.Site.Params.contentTypeName }} {{ if ne .Identifier $.Site.Params.contentTypeName }}
{{ if in (first 2 .URL) "#" }}
<div class="post"> <div class="post">
{{ $section := path.Join "homepage" .Identifier }} {{ $section := path.Join "homepage" .Identifier }}
{{ with $.Site.GetPage $section }} {{ with $.Site.GetPage $section }}
{{ partial "section.html" . }} {{ partial "section.html" . }}
{{ end }} {{ end }}
</div> </div>
{{ end }}
{{ else }} {{ else }}
{{ range $paginator.Pages }} {{ range $paginator.Pages }}
<div class="post on-list"> <div class="post on-list">
@ -89,6 +88,7 @@
</div> </div>
<hr class="section-separator"> <hr class="section-separator">
{{ end }} {{ end }}
{{ end }}
</div> </div>
{{ end }} {{ end }}