Skip to content

Commit d8cd8c0

Browse files
committed
Sidebar shows only current topic posts
1 parent 5267fa8 commit d8cd8c0

1 file changed

Lines changed: 8 additions & 13 deletions

File tree

layouts/_default/baseof.html

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,15 @@ <h3><a href="{{ .FirstSection.Permalink }}">{{ .FirstSection.Title }}</a></h3>
2929
{{ end }}
3030
</ul>
3131
{{ else }}
32-
{{/* Hide empty sections; they re-appear automatically once a post is added. */}}
33-
{{ range .Site.Sections }}
34-
{{ if .Pages }}
35-
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
36-
<ul>
37-
{{ range first 5 .Pages.ByDate.Reverse }}
38-
<li><a href="{{ .Permalink }}"{{ if eq $.RelPermalink .RelPermalink }} class="active"{{ end }}>{{ .Title }}</a></li>
39-
{{ end }}
40-
{{ if gt (len .Pages) 5 }}
41-
<li><a href="{{ .Permalink }}">See all →</a></li>
42-
{{ end }}
43-
</ul>
32+
<h3>{{ .Title }}</h3>
33+
<ul>
34+
{{ range first 5 .Pages.ByDate.Reverse }}
35+
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
36+
{{ end }}
37+
{{ if gt (len .Pages) 5 }}
38+
<li><a href="{{ .Permalink }}">See all →</a></li>
4439
{{ end }}
45-
{{ end }}
40+
</ul>
4641
{{ end }}
4742
</aside>
4843
{{ end }}

0 commit comments

Comments
 (0)