Add categories to cookbook

This commit is contained in:
Paulus Schoutsen 2016-02-07 14:21:44 -08:00
parent f5a7217b3f
commit a06217bbee
17 changed files with 273 additions and 20 deletions

View file

@ -0,0 +1,25 @@
<section class="aside-module grid__item one-whole lap-one-half">
{% include edit_github.html %}
{% assign cookbook = site.cookbook | sort: 'title' %}
<div class='section'>
<a href='/cookbook'>Back to the cookbook</a>
</div>
<div class='section'>
<h1 class="title delta">{{page.ha_category}}</h1>
<ul class='divided'>
{% for recipe in cookbook %}
{% if recipe.ha_category == page.ha_category %}
<li>
{% if recipe.url == page.url %}
{{recipe.title}}
{% else %}
<a href='{{recipe.url}}'>{{recipe.title}}</a>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</section>

View file

@ -2,6 +2,8 @@
{% assign url_parts = page.url | split: '/' %}
{% if url_parts[1] == 'components' %}
{% include asides/component_navigation.html | compact_newlines %}
{% elsif url_parts[1] == 'cookbook' %}
{% include asides/cookbook_navigation.html | compact_newlines %}
{% else %}
{% include asides/about.html %}