File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
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
+
You can’t perform that action at this time.
0 commit comments