Skip to content

Commit

Permalink
override theme to check menu existence
Browse files Browse the repository at this point in the history
  • Loading branch information
leonstafford committed Sep 25, 2020
1 parent 28d67b9 commit f416726
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
16 changes: 16 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ if .Site.Menus.main }}
<p><a name="nav-menu" id="nav-menu"><strong>Site menu</strong></a></p>

<ul>
{{ range .Site.Menus.main }}
<li>
<a href="{{ .URL }}">
{{ $text := print .Name | safeHTML }}
{{ $text }}
</a>
</li>
{{ end }}
</ul>
{{ end }}

<p><a href="#">Back to top</a></p>
5 changes: 5 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ if .Site.Menus.main }}
<p><a href="#nav-menu">Menu</a></p>
{{ end }}


0 comments on commit f416726

Please sign in to comment.