Skip to content

Commit 697e3fb

Browse files
committed
Add recipe links to the home page
Removes an unnecessary click to get to content. Should make the site friendlier to non-contributors.
1 parent c06f29f commit 697e3fb

File tree

3 files changed

+40
-18
lines changed

3 files changed

+40
-18
lines changed

chapters/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
2222
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
2323

24-
<h2><a href="{{ url }}">{{ chapter }}</a></h2
24+
<h2><a href="{{ url }}">{{ chapter }}</a></h2>
2525

2626
<ul>
2727
{% for page in site.pages %}

index.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
layout: default
3+
title: Home
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+
- Regular Expressions
15+
- Networking
16+
- Design Patterns
17+
---
18+
19+
<h1>Welcome</h1>
20+
21+
<p>Welcome to the CoffeeScript Cookbook! CoffeeScript recipes for the community <em>by</em> the community. Head over to the <a href="/contributing">Contributing</a> page and see what you can do to help out!</p>
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></h2>
28+
29+
<ul>
30+
{% for page in site.pages %}
31+
{% if page.url contains url %}
32+
{% unless page.url == indexurl %}
33+
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
34+
{% endunless %}
35+
{% endif %}
36+
{% endfor %}
37+
</ul>
38+
39+
{% endfor %}

index.textile

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)