Skip to content

Commit 4e93202

Browse files
committed
Move chapter indexes to HTML
The textile markup was putting each link in its own list. The result was lots of unnecessary whitespace on those pages.
1 parent 88ae766 commit 4e93202

File tree

15 files changed

+45
-31
lines changed

15 files changed

+45
-31
lines changed

chapters/ajax/index.textile renamed to chapters/ajax/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
{% capture url %}/chapters/{{ page.chapter | replace: ' ', '_' | downcase }}{% endcapture %}
88
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
99

10+
<ul>
1011
{% for page in site.pages %}
1112
{% if page.url contains url %}
1213
{% unless page.url == indexurl %}
13-
* <a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a>
14+
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
1415
{% endunless %}
1516
{% endif %}
1617
{% endfor %}
17-
18+
</ul>

chapters/arrays/index.textile renamed to chapters/arrays/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
{% capture url %}/chapters/{{ page.chapter | replace: ' ', '_' | downcase }}{% endcapture %}
88
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
99

10+
<ul>
1011
{% for page in site.pages %}
1112
{% if page.url contains url %}
1213
{% unless page.url == indexurl %}
13-
* <a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a>
14+
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
1415
{% endunless %}
1516
{% endif %}
1617
{% endfor %}
17-
18+
</ul>
File renamed without changes.

chapters/classes_and_objects/index.textile renamed to chapters/classes_and_objects/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
{% capture url %}/chapters/{{ page.chapter | replace: ' ', '_' | downcase }}{% endcapture %}
88
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
99

10+
<ul>
1011
{% for page in site.pages %}
1112
{% if page.url contains url %}
1213
{% unless page.url == indexurl %}
13-
* <a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a>
14+
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
1415
{% endunless %}
1516
{% endif %}
1617
{% endfor %}
17-
18+
</ul>

chapters/dates_and_times/index.textile renamed to chapters/dates_and_times/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
{% capture url %}/chapters/{{ page.chapter | replace: ' ', '_' | downcase }}{% endcapture %}
88
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
99

10+
<ul>
1011
{% for page in site.pages %}
1112
{% if page.url contains url %}
1213
{% unless page.url == indexurl %}
13-
* <a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a>
14+
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
1415
{% endunless %}
1516
{% endif %}
1617
{% endfor %}
17-
18+
</ul>

chapters/design_patterns/index.textile renamed to chapters/design_patterns/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
{% capture url %}/chapters/{{ page.chapter | replace: ' ', '_' | downcase }}{% endcapture %}
88
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
99

10+
<ul>
1011
{% for page in site.pages %}
1112
{% if page.url contains url %}
1213
{% unless page.url == indexurl %}
13-
* <a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a>
14+
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
1415
{% endunless %}
1516
{% endif %}
1617
{% endfor %}
17-
18+
</ul>

chapters/functions/index.textile renamed to chapters/functions/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
{% capture url %}/chapters/{{ page.chapter | replace: ' ', '_' | downcase }}{% endcapture %}
88
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
99

10+
<ul>
1011
{% for page in site.pages %}
1112
{% if page.url contains url %}
1213
{% unless page.url == indexurl %}
13-
* <a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a>
14+
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
1415
{% endunless %}
1516
{% endif %}
1617
{% endfor %}
17-
18+
</ul>

chapters/index.textile renamed to chapters/index.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@
2222
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
2323
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
2424

25-
h2. <a href="{{ url }}">{{ chapter }}</a>
25+
<h2><a href="{{ url }}">{{ chapter }}</a></h2
2626

27-
{% for page in site.pages %}
27+
<ul>
28+
{% for page in site.pages %}
2829
{% if page.url contains url %}
2930
{% unless page.url == indexurl %}
30-
* <a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a>
31+
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
3132
{% endunless %}
3233
{% endif %}
3334
{% endfor %}
34-
{% endfor %}
35-
35+
</ul>
3636

37+
{% endfor %}

chapters/jquery/index.textile renamed to chapters/jquery/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
{% capture url %}/chapters/{{ page.chapter | replace: ' ', '_' | downcase }}{% endcapture %}
88
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
99

10+
<ul>
1011
{% for page in site.pages %}
1112
{% if page.url contains url %}
1213
{% unless page.url == indexurl %}
13-
* <a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a>
14+
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
1415
{% endunless %}
1516
{% endif %}
1617
{% endfor %}
17-
18+
</ul>

chapters/math/index.textile renamed to chapters/math/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
{% capture url %}/chapters/{{ page.chapter | replace: ' ', '_' | downcase }}{% endcapture %}
88
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
99

10+
<ul>
1011
{% for page in site.pages %}
1112
{% if page.url contains url %}
1213
{% unless page.url == indexurl %}
13-
* <a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a>
14+
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
1415
{% endunless %}
1516
{% endif %}
1617
{% endfor %}
17-
18+
</ul>

0 commit comments

Comments
 (0)