Allow sidebar navs with custom sidebar content

Multiple sidebar navs can also be included on a page:

```
sidebar:
  - title: Navigation 1
    nav: nav1
  - title: Navigation 2
    nav: nav2
```

Fixes #1986
This commit is contained in:
Michael Rose 2018-12-04 14:17:54 -05:00
parent be82750f82
commit 9de7eab353
3 changed files with 3 additions and 2 deletions

View file

@ -14,6 +14,7 @@
{% endif %}
{% if s.title %}<h3>{{ s.title }}</h3>{% endif %}
{% if s.text %}{{ s.text | markdownify }}{% endif %}
{% if s.nav %}{% include nav_list nav=s.nav %}{% endif %}
{% endfor %}
{% if page.sidebar.nav %}
{% include nav_list nav=page.sidebar.nav %}

View file

@ -9,6 +9,7 @@ sidebar:
text: "Some text here."
- title: "Another Title"
text: "More text here."
nav: sidebar-sample
---
This post has a custom sidebar set in the post's YAML Front Matter.

View file

@ -7,8 +7,7 @@ sidebar:
image: http://placehold.it/350x250
image_alt: "image"
text: "Some text here."
- title: "Another Title"
text: "More text here."
nav: sidebar-sample
---
This post has a custom sidebar set in the post's YAML Front Matter.