Skip to content

Commit 7ff9e5c

Browse files
authored
Merge pull request coffeescript-cookbook#144 from blowmage/update-data
Replace page data with site data [refs coffeescript-cookbook#142]
2 parents 3346056 + 50515c7 commit 7ff9e5c

File tree

5 files changed

+21
-81
lines changed

5 files changed

+21
-81
lines changed

_data/chapters.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
- Syntax
3+
- Classes and Objects
4+
- Strings
5+
- Arrays
6+
- Dates and Times
7+
- Math
8+
- Functions
9+
- Metaprogramming
10+
- jQuery
11+
- Ajax
12+
- Regular Expressions
13+
- Networking
14+
- Design Patterns
15+
- Databases
16+
- Testing

_layouts/chapter.html

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
---
2-
chapters:
3-
- Syntax
4-
- Classes and Objects
5-
- Strings
6-
- Arrays
7-
- Dates and Times
8-
- Math
9-
- Functions
10-
- Metaprogramming
11-
- jQuery
12-
- Ajax
13-
- Regular Expressions
14-
- Networking
15-
- Design Patterns
16-
- Databases
17-
- Testing
18-
---
19-
201
<!doctype html>
212
<html>
223
<head>
@@ -72,7 +53,7 @@ <h6><a class="nav-link" href="{{ site.baseurl }}/"><span class="entypo">&oacute;
7253
<section class="sidebar-block">
7354
<h5 class="sidebar-title">Chapters Index</h5>
7455
<ol class="navigation chapters-list">
75-
{% for chapter in page.chapters %}
56+
{% for chapter in site.data.chapters %}
7657
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
7758
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
7859
<li class="chapter">
@@ -97,4 +78,3 @@ <h5 class="sidebar-title">Chapters Index</h5>
9778

9879
</body>
9980
</html>
100-

_layouts/default.html

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
---
2-
chapters:
3-
- Syntax
4-
- Classes and Objects
5-
- Strings
6-
- Arrays
7-
- Dates and Times
8-
- Math
9-
- Functions
10-
- Metaprogramming
11-
- jQuery
12-
- Ajax
13-
- Regular Expressions
14-
- Networking
15-
- Design Patterns
16-
- Databases
17-
- Testing
18-
---
19-
201
<!doctype html>
212
<html>
223
<head>
@@ -69,7 +50,7 @@ <h6><a class="nav-link" href="{{ site.baseurl }}/"><span class="entypo">&oacute;
6950
<section class="sidebar-block">
7051
<h5 class="sidebar-title">Chapters Index</h5>
7152
<ol class="navigation chapters-list">
72-
{% for chapter in page.chapters %}
53+
{% for chapter in site.data.chapters %}
7354
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
7455
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
7556
<li class="chapter">
@@ -94,4 +75,3 @@ <h5 class="sidebar-title">Chapters Index</h5>
9475

9576
</body>
9677
</html>
97-

_layouts/recipe.html

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
---
2-
chapters:
3-
- Syntax
4-
- Classes and Objects
5-
- Strings
6-
- Arrays
7-
- Dates and Times
8-
- Math
9-
- Functions
10-
- Metaprogramming
11-
- jQuery
12-
- Ajax
13-
- Regular Expressions
14-
- Networking
15-
- Design Patterns
16-
- Databases
17-
- Testing
18-
---
19-
201
<!doctype html>
212
<html>
223
<head>
@@ -71,7 +52,7 @@ <h6><a class="nav-link" href="{{ site.baseurl }}/"><span class="entypo">&oacute;
7152
<section class="sidebar-block">
7253
<h5 class="sidebar-title">Chapters Index</h5>
7354
<ol class="navigation chapters-list">
74-
{% for chapter in page.chapters %}
55+
{% for chapter in site.data.chapters %}
7556
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
7657
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
7758
<li class="chapter">
@@ -96,4 +77,3 @@ <h5 class="sidebar-title">Chapters Index</h5>
9677

9778
</body>
9879
</html>
99-

chapters/index.html

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,14 @@
11
---
22
layout: default
33
title: Cookbook
4-
chapters:
5-
- Syntax
6-
- Classes and Objects
7-
- Strings
8-
- Arrays
9-
- Dates and Times
10-
- Math
11-
- Functions
12-
- Metaprogramming
13-
- jQuery
14-
- Ajax
15-
- Regular Expressions
16-
- Networking
17-
- Design Patterns
18-
- Databases
19-
- Testing
204
---
215

226
<article class="content-block">
237

248
<h5 class="sidebar-title">Chapters</h5>
259

2610
<ol class="navigation chapters-list">
27-
{% for chapter in page.chapters %}
11+
{% for chapter in site.data.chapters %}
2812
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
2913
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
3014
<li class="chapter">
@@ -42,4 +26,4 @@ <h4><a class="chapter-title" href="{{ site.baseurl }}{{ url }}">{{ chapter }}</a
4226
{% endfor %}
4327
</ol>
4428

45-
</article>
29+
</article>

0 commit comments

Comments
 (0)