Include category links on category pages.
This commit is contained in:
parent
e7c33958b7
commit
dd744af428
9
_includes/category_menu_top.html
Normal file
9
_includes/category_menu_top.html
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<div class="category-menu">
|
||||||
|
{% for category in site.category_metadata %}
|
||||||
|
<span class="category-link">
|
||||||
|
<a href="/{{category.first}}">
|
||||||
|
{{ category.last["title"] }}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
|
@ -2,7 +2,8 @@
|
||||||
layout: default
|
layout: default
|
||||||
---
|
---
|
||||||
<article class="post">
|
<article class="post">
|
||||||
|
{% include category_menu_top.html %}
|
||||||
|
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
<h1 class="post-title">{{ page.title }}</h1>
|
<h1 class="post-title">{{ page.title }}</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
10
index.html
10
index.html
|
@ -2,15 +2,7 @@
|
||||||
layout: default
|
layout: default
|
||||||
---
|
---
|
||||||
<div class="home">
|
<div class="home">
|
||||||
<div class="category-menu">
|
{% include category_menu_top.html %}
|
||||||
{% for category in site.category_metadata %}
|
|
||||||
<span class="category-link">
|
|
||||||
<a href="{{category.first | prepend: site.baseurl}}">
|
|
||||||
{{ category.last["title"] }}
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% assign last_meta = site.categories.meta.first %}
|
{% assign last_meta = site.categories.meta.first %}
|
||||||
{% if last_meta.active %}
|
{% if last_meta.active %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user