Skip to content

Commit 86a0c1c

Browse files
David Bradysreid
authored andcommitted
Test commit to debug number_of_words
1 parent e555fe9 commit 86a0c1c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

chapters/index2.textile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
layout: default
3+
title: Cookbook
4+
chapters:
5+
- Syntax
6+
- Objects
7+
- Strings
8+
- Arrays
9+
- Dates and Times
10+
- Math
11+
- Functions
12+
- jQuery
13+
- Regular Expressions
14+
- AJAX
15+
---
16+
17+
h1. Word Count Test Page -- Github != Localhost, why?
18+
19+
20+
{% comment %} Hack to count up actual recipes {% endcomment %}
21+
{% capture recipe_count %}{% endcapture %}
22+
23+
{% for chapter in page.chapters %}
24+
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
25+
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
26+
27+
h2. <a href="{{ url }}">{{ chapter }}</a>
28+
29+
{% for page in site.pages %}
30+
{% if page.url contains url %}
31+
{% unless page.url == indexurl %}
32+
{% capture recipe_count %}word {{ recipe_count }}{% endcapture %}
33+
* <a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a> ({{recipe_count}})
34+
{% endunless %}
35+
{% endif %}
36+
{% endfor %}
37+
{% endfor %}
38+
39+
_The CoffeeScript Cookbook currently has {{ recipe_count | number_of_words }} recipes in {{ page.chapters | size }} chapters._
40+

0 commit comments

Comments
 (0)