1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-09-27 18:34:16 +02:00

Allow configuration of optional sidebar links

Add something like the following to your config:

  [[menu.sidebar]]
    name = "Link 1"
    url = "https://link1.com"

  [[menu.sidebar]]
    name = "Link 2"
    url = "https://link2.com"

See the Hugo docs for more examples: https://gohugo.io/extras/menus/
This commit is contained in:
Alan Orth 2016-09-08 15:00:23 +03:00
parent 3a08993bcb
commit 192d0bbee6
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -17,12 +17,14 @@
</ol>
</section>
{{ with .Site.Menus.sidebar }}
<section class="sidebar-module">
<h4>Elsewhere</h4>
<h4>Links</h4>
<ol class="list-unstyled">
<li><a href="#">GitHub</a></li>
<li><a href="#">Twitter</a></li>
<li><a href="#">Facebook</a></li>
{{ range . }}
<li><a href="{{ .URL | absURL }}">{{ .Name }}</a></li>
{{ end }}
</ol>
</section>
{{ end }}
</aside><!-- /.blog-sidebar -->