Skip to content

Commit 5fc87b7

Browse files
author
Mike Moore
committed
Update chapter filter logic
The previous way was inlining errors on GitHub...
1 parent 3c6ca3e commit 5fc87b7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

chapters/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ <h1>Chapter Index</h1>
66
<h2>Working with Strings</h2>
77
{% for page in site.pages %}
88
<ul>
9-
{% if page.categories contains 'strings' %}
9+
{% if page.url contains '/chapters/strings/' %}
1010
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
1111
{% endif %}
1212
</ul>
1313
{% endfor %}
1414
<h2>Working with Arrays</h2>
1515
{% for page in site.pages %}
1616
<ul>
17-
{% if page.categories contains 'arrays' %}
17+
{% if page.url contains '/chapters/arrays/' %}
1818
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
1919
{% endif %}
2020
</ul>
21-
{% endfor %}
21+
{% endfor %}

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ <h1>CoffeeScript Cookbook</h1>
1717
<h2>Working with Strings</h2>
1818
{% for page in site.pages %}
1919
<ul>
20-
{% if page.categories contains 'strings' %}
20+
{% if page.url contains '/chapters/strings/' %}
2121
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
2222
{% endif %}
2323
</ul>
2424
{% endfor %}
2525
<h2>Working with Arrays</h2>
2626
{% for page in site.pages %}
2727
<ul>
28-
{% if page.categories contains 'arrays' %}
28+
{% if page.url contains '/chapters/arrays/' %}
2929
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
3030
{% endif %}
3131
</ul>

0 commit comments

Comments
 (0)