Skip to content

Commit ebfed06

Browse files
committed
Added {{ site.baseurl }} to all links
1 parent 93554ef commit ebfed06

38 files changed

+86
-85
lines changed

Diff for: _config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
baseurl: ''
12
safe: true
23
pygments: true
34
lsi: false

Diff for: _layouts/chapter.html

+12-12
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
<meta charset="utf-8">
2424
<meta name="viewport" content="width=device-width">
2525
<title>CoffeeScript Cookbook &raquo; {{ page.title }}</title>
26-
<link type="image/x-icon" rel="shortcut icon" href="/images/favicon.ico">
27-
<link rel="stylesheet" href="/css/style.css" type="text/css">
26+
<link type="image/x-icon" rel="shortcut icon" href="{{ site.baseurl }}/images/favicon.ico">
27+
<link rel="stylesheet" href="{{ site.baseurl }}/css/style.css" type="text/css">
2828
</head>
2929
<body>
3030

3131
<section class="container">
3232

3333
<header class="header">
34-
<h1><a class="" href="/"><span class="entypo">&oacute;</span><span class="title ir">CoffeeScript Cookbook</span></a></h1>
34+
<h1><a class="" href="{{ site.baseurl }}/"><span class="entypo">&oacute;</span><span class="title ir">CoffeeScript Cookbook</span></a></h1>
3535
</header>
3636

3737
<section class="content">
@@ -42,8 +42,8 @@ <h2>{{ page.title }}</h2>
4242
</article>
4343

4444
<footer class="footer content-block">
45-
<p>Don't see the recipe you want? Add it yourself by reading the <a href="/contributing">Contributor's Guide</a>, or request it by adding it to <a href="/wanted-recipes">Wanted Recipes</a>.</p>
46-
<a href="/license"><img src="/images/cc_by_badge.png" /></a>
45+
<p>Don't see the recipe you want? Add it yourself by reading the <a href="{{ site.baseurl }}/contributing">Contributor's Guide</a>, or request it by adding it to <a href="{{ site.baseurl }}/wanted-recipes">Wanted Recipes</a>.</p>
46+
<a href="{{ site.baseurl }}/license"><img src="{{ site.baseurl }}/images/cc_by_badge.png" /></a>
4747
</footer>
4848

4949
</section>
@@ -54,17 +54,17 @@ <h2>{{ page.title }}</h2>
5454

5555
<section class="sidebar-block block-short">
5656
<nav class="navigation pages-nav home-nav">
57-
<h6><a class="nav-link" href="/"><span class="entypo">&oacute;</span>CoffeeScript Cookbook</a></h6>
57+
<h6><a class="nav-link" href="{{ site.baseurl }}/"><span class="entypo">&oacute;</span>CoffeeScript Cookbook</a></h6>
5858
<small class="thin dimmed">(last updated {{ site.time | date: "%d %B, %Y" }})</small>
5959
</nav>
6060
</section>
6161

6262
<section class="sidebar-block">
6363
<nav class="navigation pages-nav">
6464
<ul class="plain-list inline-list">
65-
<li><a class="nav-link" href="/contributing"><span class="entypo">6</span>Contribute</a></li>
66-
<li><a class="nav-link" href="/authors"><span class="entypo">,</span>Authors</a></li>
67-
<li><a class="nav-link" href="/license"><span class="entypo">&copy;</span>License</a></li>
65+
<li><a class="nav-link" href="{{ site.baseurl }}/contributing"><span class="entypo">6</span>Contribute</a></li>
66+
<li><a class="nav-link" href="{{ site.baseurl }}/authors"><span class="entypo">,</span>Authors</a></li>
67+
<li><a class="nav-link" href="{{ site.baseurl }}/license"><span class="entypo">&copy;</span>License</a></li>
6868
</ul>
6969
</nav>
7070
</section>
@@ -76,12 +76,12 @@ <h5 class="sidebar-title">Chapters Index</h5>
7676
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
7777
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
7878
<li class="chapter">
79-
<div class="sidebar-subtitle{% if page.url == indexurl %} page-active{% endif %}"><strong><a class="chapter-title" href="{{ url }}">{{ chapter }}</a></strong></div>
79+
<div class="sidebar-subtitle{% if page.url == indexurl %} page-active{% endif %}"><strong><a class="chapter-title" href="{{ site.baseurl }}{{ url }}">{{ chapter }}</a></strong></div>
8080
<ul class="pseudo-list recipes-list">
8181
{% for site_page in site.pages %}
8282
{% if site_page.url contains url %}
8383
{% unless site_page.url == indexurl %}
84-
<li class="list-item recipe{% if page.url == site_page.url %} page-active{% endif %}"><a class="recipe-title" href="{{ site_page.url | replace: '.html', '' }}">{{ site_page.title }}</a></li>
84+
<li class="list-item recipe{% if page.url == site_page.url %} page-active{% endif %}"><a class="recipe-title" href="{{ site.baseurl }}{{ site_page.url | replace: '.html', '' }}">{{ site_page.title }}</a></li>
8585
{% endunless %}
8686
{% endif %}
8787
{% endfor %}
@@ -93,7 +93,7 @@ <h5 class="sidebar-title">Chapters Index</h5>
9393

9494
</aside>
9595

96-
<script type="text/javascript" src="/js/scripts.js"></script>
96+
<script type="text/javascript" src="{{ site.baseurl }}/js/scripts.js"></script>
9797

9898
</body>
9999
</html>

Diff for: _layouts/default.html

+12-12
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,24 @@
2323
<meta charset="utf-8">
2424
<meta name="viewport" content="width=device-width">
2525
<title>CoffeeScript Cookbook &raquo; {{ page.title }}</title>
26-
<link type="image/x-icon" rel="shortcut icon" href="/images/favicon.ico">
27-
<link rel="stylesheet" href="/css/style.css" type="text/css">
26+
<link type="image/x-icon" rel="shortcut icon" href="{{ site.baseurl }}/images/favicon.ico">
27+
<link rel="stylesheet" href="{{ site.baseurl }}/css/style.css" type="text/css">
2828
</head>
2929
<body>
3030

3131
<section class="container">
3232

3333
<header class="header">
34-
<h1><a class="" href="/"><span class="entypo">&oacute;</span><span class="title ir">CoffeeScript Cookbook</span></a></h1>
34+
<h1><a class="" href="{{ site.baseurl }}/"><span class="entypo">&oacute;</span><span class="title ir">CoffeeScript Cookbook</span></a></h1>
3535
</header>
3636

3737
<section class="content">
3838

3939
<article class="content-block">{{ content }}</article>
4040

4141
<footer class="footer content-block">
42-
<p>Don't see a recipe you want? See an entire missing chapter? Add it yourself by reading the <a href="/contributing">Contributor's Guide</a>, or request it by adding it to <a href="/wanted-recipes">Wanted Recipes</a>.</p>
43-
<a href="/license"><img src="/images/cc_by_badge.png" /></a>
42+
<p>Don't see a recipe you want? See an entire missing chapter? Add it yourself by reading the <a href="{{ site.baseurl }}/contributing">Contributor's Guide</a>, or request it by adding it to <a href="{{ site.baseurl }}/wanted-recipes">Wanted Recipes</a>.</p>
43+
<a href="{{ site.baseurl }}/license"><img src="{{ site.baseurl }}/images/cc_by_badge.png" /></a>
4444
</footer>
4545

4646
</section>
@@ -51,17 +51,17 @@ <h1><a class="" href="/"><span class="entypo">&oacute;</span><span class="title
5151

5252
<section class="sidebar-block block-short">
5353
<nav class="navigation pages-nav home-nav">
54-
<h6><a class="nav-link" href="/"><span class="entypo">&oacute;</span>CoffeeScript Cookbook</a></h6>
54+
<h6><a class="nav-link" href="{{ site.baseurl }}/"><span class="entypo">&oacute;</span>CoffeeScript Cookbook</a></h6>
5555
<small class="thin dimmed">(last updated {{ site.time | date: "%d %B, %Y" }})</small>
5656
</nav>
5757
</section>
5858

5959
<section class="sidebar-block">
6060
<nav class="navigation pages-nav">
6161
<ul class="plain-list inline-list">
62-
<li><a class="nav-link" href="/contributing"><span class="entypo">6</span>Contribute</a></li>
63-
<li><a class="nav-link" href="/authors"><span class="entypo">,</span>Authors</a></li>
64-
<li><a class="nav-link" href="/license"><span class="entypo">&copy;</span>License</a></li>
62+
<li><a class="nav-link" href="{{ site.baseurl }}/contributing"><span class="entypo">6</span>Contribute</a></li>
63+
<li><a class="nav-link" href="{{ site.baseurl }}/authors"><span class="entypo">,</span>Authors</a></li>
64+
<li><a class="nav-link" href="{{ site.baseurl }}/license"><span class="entypo">&copy;</span>License</a></li>
6565
</ul>
6666
</nav>
6767
</section>
@@ -73,12 +73,12 @@ <h5 class="sidebar-title">Chapters Index</h5>
7373
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
7474
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
7575
<li class="chapter">
76-
<div class="sidebar-subtitle{% if page.url == indexurl %} page-active{% endif %}"><strong><a class="chapter-title" href="{{ url }}">{{ chapter }}</a></strong></div>
76+
<div class="sidebar-subtitle{% if page.url == indexurl %} page-active{% endif %}"><strong><a class="chapter-title" href="{{ site.baseurl }}{{ url }}">{{ chapter }}</a></strong></div>
7777
<ul class="pseudo-list recipes-list">
7878
{% for site_page in site.pages %}
7979
{% if site_page.url contains url %}
8080
{% unless site_page.url == indexurl %}
81-
<li class="list-item recipe{% if page.url == site_page.url %} page-active{% endif %}"><a class="recipe-title" href="{{ site_page.url | replace: '.html', '' }}">{{ site_page.title }}</a></li>
81+
<li class="list-item recipe{% if page.url == site_page.url %} page-active{% endif %}"><a class="recipe-title" href="{{ site.baseurl }}{{ site_page.url | replace: '.html', '' }}">{{ site_page.title }}</a></li>
8282
{% endunless %}
8383
{% endif %}
8484
{% endfor %}
@@ -90,7 +90,7 @@ <h5 class="sidebar-title">Chapters Index</h5>
9090

9191
</aside>
9292

93-
<script type="text/javascript" src="/js/scripts.js"></script>
93+
<script type="text/javascript" src="{{ site.baseurl }}/js/scripts.js"></script>
9494

9595
</body>
9696
</html>

Diff for: _layouts/recipe.html

+12-12
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
<meta charset="utf-8">
2424
<meta name="viewport" content="width=device-width">
2525
<title>CoffeeScript Cookbook &raquo; {{ page.title }}</title>
26-
<link type="image/x-icon" rel="shortcut icon" href="/images/favicon.ico">
27-
<link rel="stylesheet" href="/css/style.css" type="text/css">
26+
<link type="image/x-icon" rel="shortcut icon" href="{{ site.baseurl }}/images/favicon.ico">
27+
<link rel="stylesheet" href="{{ site.baseurl }}/css/style.css" type="text/css">
2828
</head>
2929
<body>
3030

3131
<section class="container">
3232

3333
<header class="header">
34-
<h1><a class="" href="/"><span class="entypo">&oacute;</span><span class="title ir">CoffeeScript Cookbook</span></a></h1>
34+
<h1><a class="" href="{{ site.baseurl }}/"><span class="entypo">&oacute;</span><span class="title ir">CoffeeScript Cookbook</span></a></h1>
3535
</header>
3636

3737
<section class="content">
@@ -42,8 +42,8 @@ <h1>{{ page.title }}</h1>
4242
</article>
4343

4444
<footer class="footer">
45-
<p>Is this recipe wrong, incomplete, or non idiomatic? Help fix it by reading the <a href="/contributing">Contributor's Guide</a>!</p>
46-
<a href="/license"><img src="/images/cc_by_badge.png" /></a>
45+
<p>Is this recipe wrong, incomplete, or non idiomatic? Help fix it by reading the <a href="{{ site.baseurl }}/contributing">Contributor's Guide</a>!</p>
46+
<a href="{{ site.baseurl }}/license"><img src="{{ site.baseurl }}/images/cc_by_badge.png" /></a>
4747
</footer>
4848
</section>
4949

@@ -53,17 +53,17 @@ <h1>{{ page.title }}</h1>
5353

5454
<section class="sidebar-block block-short">
5555
<nav class="navigation pages-nav home-nav">
56-
<h6><a class="nav-link" href="/"><span class="entypo">&oacute;</span>CoffeeScript Cookbook</a></h6>
56+
<h6><a class="nav-link" href="{{ site.baseurl }}/"><span class="entypo">&oacute;</span>CoffeeScript Cookbook</a></h6>
5757
<small class="thin dimmed">(last updated {{ site.time | date: "%d %B, %Y" }})</small>
5858
</nav>
5959
</section>
6060

6161
<section class="sidebar-block">
6262
<nav class="navigation pages-nav">
6363
<ul class="plain-list inline-list">
64-
<li><a class="nav-link" href="/contributing"><span class="entypo">6</span>Contribute</a></li>
65-
<li><a class="nav-link" href="/authors"><span class="entypo">,</span>Authors</a></li>
66-
<li><a class="nav-link" href="/license"><span class="entypo">&copy;</span>License</a></li>
64+
<li><a class="nav-link" href="{{ site.baseurl }}/contributing"><span class="entypo">6</span>Contribute</a></li>
65+
<li><a class="nav-link" href="{{ site.baseurl }}/authors"><span class="entypo">,</span>Authors</a></li>
66+
<li><a class="nav-link" href="{{ site.baseurl }}/license"><span class="entypo">&copy;</span>License</a></li>
6767
</ul>
6868
</nav>
6969
</section>
@@ -75,12 +75,12 @@ <h5 class="sidebar-title">Chapters Index</h5>
7575
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
7676
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
7777
<li class="chapter">
78-
<div class="sidebar-subtitle{% if page.url == indexurl %} page-active{% endif %}"><strong><a class="chapter-title" href="{{ url }}">{{ chapter }}</a></strong></div>
78+
<div class="sidebar-subtitle{% if page.url == indexurl %} page-active{% endif %}"><strong><a class="chapter-title" href="{{ site.baseurl }}{{ url }}">{{ chapter }}</a></strong></div>
7979
<ul class="pseudo-list recipes-list">
8080
{% for site_page in site.pages %}
8181
{% if site_page.url contains url %}
8282
{% unless site_page.url == indexurl %}
83-
<li class="list-item recipe{% if page.url == site_page.url %} page-active{% endif %}"><a class="recipe-title" href="{{ site_page.url | replace: '.html', '' }}">{{ site_page.title }}</a></li>
83+
<li class="list-item recipe{% if page.url == site_page.url %} page-active{% endif %}"><a class="recipe-title" href="{{ site.baseurl }}{{ site_page.url | replace: '.html', '' }}">{{ site_page.title }}</a></li>
8484
{% endunless %}
8585
{% endif %}
8686
{% endfor %}
@@ -92,7 +92,7 @@ <h5 class="sidebar-title">Chapters Index</h5>
9292

9393
</aside>
9494

95-
<script type="text/javascript" src="/js/scripts.js"></script>
95+
<script type="text/javascript" src="{{ site.baseurl }}/js/scripts.js"></script>
9696

9797
</body>
9898
</html>

Diff for: authors-guide.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Author's Guide
66

77
## tl;dr: Look at Other Recipes, and Blend In
88

9-
Look at the source of other recipe pages and follow that page structure. Start with the [Developer's Guide](/developers-guide) to get a test version of the cookbook up and running on your machine, and get to work!
9+
Look at the source of other recipe pages and follow that page structure. Start with the [Developer's Guide]({{ site.baseurl }}/developers-guide) to get a test version of the cookbook up and running on your machine, and get to work!
1010

1111
## General Guidelines
1212

@@ -26,7 +26,7 @@ A typical cookbook page will have three sections (four if you count the title):
2626

2727
## Copyright Issues
2828

29-
Do not post code that is copyrighted by another user, unless you have permission to use that code AND to relicense that code under the [CC BY 3.0](/license) license. If you DO have permission and the author would like credit, please add them to the [authors](/authors) page.
29+
Do not post code that is copyrighted by another user, unless you have permission to use that code AND to relicense that code under the [CC BY 3.0]({{ site.baseurl }}/license) license. If you DO have permission and the author would like credit, please add them to the [authors]({{ site.baseurl }}/authors) page.
3030

3131
Also, just a stylistic note, please do not yank code directly from [http://coffeescript.org/](http://coffeescript.org/) and post it with little or no discussion. The CoffeeScript Cookbook is not affiliated with them. We think they're awesome and want them to like us, too! Make sure that anything taken from [http://coffeescript.org/](http://coffeescript.org/) is permissible use and that it stands alone as a valid recipe. If the recipe is too terse, consider adding more examples and discussion.
3232

@@ -99,7 +99,7 @@ When in doubt about what output to show, try evaluating your snippet in the coff
9999

100100
## How to Add a Recipe
101101

102-
Create a new markdown page (or copy the [Recipe Template](/recipe-template). The filename should be about the problem, e.g. `finding-last-day-of-the-month.md` or `reversing-arrays.md`. In your file, start with the following template:
102+
Create a new markdown page (or copy the [Recipe Template]({{ site.baseurl }}/recipe-template). The filename should be about the problem, e.g. `finding-last-day-of-the-month.md` or `reversing-arrays.md`. In your file, start with the following template:
103103

104104
{% highlight text %}
105105
---
@@ -175,7 +175,7 @@ See the "Weird Recipe" note above. Do real people in the real world ever hit the
175175

176176
## I Have A Problem/Solution, But It's Basically Just JavaScript. Should I Add It?
177177

178-
Yes! CoffeeScript compiles to JavaScript, and that means that some of its functionality comes straight from JavaScript. (For example, see [Reversing Arrays](/chapters/arrays/reversing-arrays).) But if you're programming in CoffeeScript and you need to reverse an array, this Cookbook should stand ready to tell you it's available to you in CoffeeScript -- even if it's just a straight call into a JavaScript library.
178+
Yes! CoffeeScript compiles to JavaScript, and that means that some of its functionality comes straight from JavaScript. (For example, see [Reversing Arrays]({{ site.baseurl }}/chapters/arrays/reversing-arrays).) But if you're programming in CoffeeScript and you need to reverse an array, this Cookbook should stand ready to tell you it's available to you in CoffeeScript -- even if it's just a straight call into a JavaScript library.
179179

180180
## I Found a Typo. Is That Enough of a Fix? Does That Count?
181181

Diff for: authors.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The following people are totally rad and awesome because they have contributed r
2424
* Calum Robertson *http://github.com/randusr836*
2525
* Jake Burkhead *https://github.com/jlburkhead*
2626
* [Alex Johnson](https://github.com/nonsensery)
27-
* ...You! What are you waiting for? Check out the [contributing](/contributing) section and get cracking!
27+
* ...You! What are you waiting for? Check out the [contributing]({{ site.baseurl }}/contributing) section and get cracking!
2828

2929
# Developers
3030

@@ -34,11 +34,11 @@ The following people are totally rad and awesome because they have contributed r
3434
* Mike Moore *[email protected]*
3535
* Peter Hellberg *[email protected]*
3636
* Jamie Gaskins *[email protected]*
37-
* ...You! What are you waiting for? Check out the [contributing](/contributing) section and get cracking!
37+
* ...You! What are you waiting for? Check out the [contributing]({{ site.baseurl }}/contributing) section and get cracking!
3838

3939
# Designers
4040

4141
The following people are astonishingly rad and awesome because they did great design for the site!
4242

4343
* [Amsul](http://github.com/amsul) [email protected]
44-
* ...You! Check out the [contributing](/contributing) section and get cracking!
44+
* ...You! Check out the [contributing]({{ site.baseurl }}/contributing) section and get cracking!

Diff for: chapters/ajax/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{% for page in site.pages %}
1212
{% if page.url contains url %}
1313
{% unless page.url == indexurl %}
14-
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
14+
<li><a href="{{ site.baseurl }}{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
1515
{% endunless %}
1616
{% endif %}
1717
{% endfor %}

Diff for: chapters/arrays/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{% for page in site.pages %}
1212
{% if page.url contains url %}
1313
{% unless page.url == indexurl %}
14-
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
14+
<li><a href="{{ site.baseurl }}{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
1515
{% endunless %}
1616
{% endif %}
1717
{% endfor %}

0 commit comments

Comments
 (0)