Skip to content

Commit 3d22b68

Browse files
authored
Update project template to handle sidebar links for non-pages. (#4)
Signed-off-by: Artem Kladov <artem.kladov@flant.com>
1 parent 843303a commit 3d22b68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layouts/_partials/sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{{- range $parent.Pages.ByWeight }}
2929
{{- if not .Params.hidden }}
3030
<li class="sidebar__submenu-item {{ if or (eq . $currentPage) (.IsAncestor $currentPage) }}active{{ end }}{{ if .Pages }} sidebar__submenu-item_parent has-children{{ end }}">
31-
<a href="{{ .RelPermalink }}">
31+
<a href="{{ if .IsPage }}{{ .RelPermalink }}{{ else }}#{{end}}">
3232
<span class="sidebar__submenu-title" {{ if eq $level 1 }}style="font-size: 16px;"{{ end }}>
3333
{{- if .Title }}
3434
{{- .Title }}

0 commit comments

Comments
 (0)