Skip to content

Commit

Permalink
Added {{ site.baseurl }} to all links
Browse files Browse the repository at this point in the history
  • Loading branch information
lolmaus committed Jan 9, 2015
1 parent 93554ef commit ebfed06
Show file tree
Hide file tree
Showing 38 changed files with 86 additions and 85 deletions.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
baseurl: ''
safe: true
pygments: true
lsi: false
Expand Down
24 changes: 12 additions & 12 deletions _layouts/chapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>CoffeeScript Cookbook &raquo; {{ page.title }}</title>
<link type="image/x-icon" rel="shortcut icon" href="/images/favicon.ico">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link type="image/x-icon" rel="shortcut icon" href="{{ site.baseurl }}/images/favicon.ico">
<link rel="stylesheet" href="{{ site.baseurl }}/css/style.css" type="text/css">
</head>
<body>

<section class="container">

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

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

<footer class="footer content-block">
<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>
<a href="/license"><img src="/images/cc_by_badge.png" /></a>
<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>
<a href="{{ site.baseurl }}/license"><img src="{{ site.baseurl }}/images/cc_by_badge.png" /></a>
</footer>

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

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

<section class="sidebar-block">
<nav class="navigation pages-nav">
<ul class="plain-list inline-list">
<li><a class="nav-link" href="/contributing"><span class="entypo">6</span>Contribute</a></li>
<li><a class="nav-link" href="/authors"><span class="entypo">,</span>Authors</a></li>
<li><a class="nav-link" href="/license"><span class="entypo">&copy;</span>License</a></li>
<li><a class="nav-link" href="{{ site.baseurl }}/contributing"><span class="entypo">6</span>Contribute</a></li>
<li><a class="nav-link" href="{{ site.baseurl }}/authors"><span class="entypo">,</span>Authors</a></li>
<li><a class="nav-link" href="{{ site.baseurl }}/license"><span class="entypo">&copy;</span>License</a></li>
</ul>
</nav>
</section>
Expand All @@ -76,12 +76,12 @@ <h5 class="sidebar-title">Chapters Index</h5>
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
<li class="chapter">
<div class="sidebar-subtitle{% if page.url == indexurl %} page-active{% endif %}"><strong><a class="chapter-title" href="{{ url }}">{{ chapter }}</a></strong></div>
<div class="sidebar-subtitle{% if page.url == indexurl %} page-active{% endif %}"><strong><a class="chapter-title" href="{{ site.baseurl }}{{ url }}">{{ chapter }}</a></strong></div>
<ul class="pseudo-list recipes-list">
{% for site_page in site.pages %}
{% if site_page.url contains url %}
{% unless site_page.url == indexurl %}
<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>
<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>
{% endunless %}
{% endif %}
{% endfor %}
Expand All @@ -93,7 +93,7 @@ <h5 class="sidebar-title">Chapters Index</h5>

</aside>

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

</body>
</html>
Expand Down
24 changes: 12 additions & 12 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>CoffeeScript Cookbook &raquo; {{ page.title }}</title>
<link type="image/x-icon" rel="shortcut icon" href="/images/favicon.ico">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link type="image/x-icon" rel="shortcut icon" href="{{ site.baseurl }}/images/favicon.ico">
<link rel="stylesheet" href="{{ site.baseurl }}/css/style.css" type="text/css">
</head>
<body>

<section class="container">

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

<section class="content">

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

<footer class="footer content-block">
<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>
<a href="/license"><img src="/images/cc_by_badge.png" /></a>
<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>
<a href="{{ site.baseurl }}/license"><img src="{{ site.baseurl }}/images/cc_by_badge.png" /></a>
</footer>

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

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

<section class="sidebar-block">
<nav class="navigation pages-nav">
<ul class="plain-list inline-list">
<li><a class="nav-link" href="/contributing"><span class="entypo">6</span>Contribute</a></li>
<li><a class="nav-link" href="/authors"><span class="entypo">,</span>Authors</a></li>
<li><a class="nav-link" href="/license"><span class="entypo">&copy;</span>License</a></li>
<li><a class="nav-link" href="{{ site.baseurl }}/contributing"><span class="entypo">6</span>Contribute</a></li>
<li><a class="nav-link" href="{{ site.baseurl }}/authors"><span class="entypo">,</span>Authors</a></li>
<li><a class="nav-link" href="{{ site.baseurl }}/license"><span class="entypo">&copy;</span>License</a></li>
</ul>
</nav>
</section>
Expand All @@ -73,12 +73,12 @@ <h5 class="sidebar-title">Chapters Index</h5>
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
<li class="chapter">
<div class="sidebar-subtitle{% if page.url == indexurl %} page-active{% endif %}"><strong><a class="chapter-title" href="{{ url }}">{{ chapter }}</a></strong></div>
<div class="sidebar-subtitle{% if page.url == indexurl %} page-active{% endif %}"><strong><a class="chapter-title" href="{{ site.baseurl }}{{ url }}">{{ chapter }}</a></strong></div>
<ul class="pseudo-list recipes-list">
{% for site_page in site.pages %}
{% if site_page.url contains url %}
{% unless site_page.url == indexurl %}
<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>
<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>
{% endunless %}
{% endif %}
{% endfor %}
Expand All @@ -90,7 +90,7 @@ <h5 class="sidebar-title">Chapters Index</h5>

</aside>

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

</body>
</html>
Expand Down
24 changes: 12 additions & 12 deletions _layouts/recipe.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>CoffeeScript Cookbook &raquo; {{ page.title }}</title>
<link type="image/x-icon" rel="shortcut icon" href="/images/favicon.ico">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link type="image/x-icon" rel="shortcut icon" href="{{ site.baseurl }}/images/favicon.ico">
<link rel="stylesheet" href="{{ site.baseurl }}/css/style.css" type="text/css">
</head>
<body>

<section class="container">

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

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

<footer class="footer">
<p>Is this recipe wrong, incomplete, or non idiomatic? Help fix it by reading the <a href="/contributing">Contributor's Guide</a>!</p>
<a href="/license"><img src="/images/cc_by_badge.png" /></a>
<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>
<a href="{{ site.baseurl }}/license"><img src="{{ site.baseurl }}/images/cc_by_badge.png" /></a>
</footer>
</section>

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

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

<section class="sidebar-block">
<nav class="navigation pages-nav">
<ul class="plain-list inline-list">
<li><a class="nav-link" href="/contributing"><span class="entypo">6</span>Contribute</a></li>
<li><a class="nav-link" href="/authors"><span class="entypo">,</span>Authors</a></li>
<li><a class="nav-link" href="/license"><span class="entypo">&copy;</span>License</a></li>
<li><a class="nav-link" href="{{ site.baseurl }}/contributing"><span class="entypo">6</span>Contribute</a></li>
<li><a class="nav-link" href="{{ site.baseurl }}/authors"><span class="entypo">,</span>Authors</a></li>
<li><a class="nav-link" href="{{ site.baseurl }}/license"><span class="entypo">&copy;</span>License</a></li>
</ul>
</nav>
</section>
Expand All @@ -75,12 +75,12 @@ <h5 class="sidebar-title">Chapters Index</h5>
{% capture url %}/chapters/{{ chapter | replace: ' ', '_' | downcase }}{% endcapture %}
{% capture indexurl %}{{ url }}/index.html{% endcapture %}
<li class="chapter">
<div class="sidebar-subtitle{% if page.url == indexurl %} page-active{% endif %}"><strong><a class="chapter-title" href="{{ url }}">{{ chapter }}</a></strong></div>
<div class="sidebar-subtitle{% if page.url == indexurl %} page-active{% endif %}"><strong><a class="chapter-title" href="{{ site.baseurl }}{{ url }}">{{ chapter }}</a></strong></div>
<ul class="pseudo-list recipes-list">
{% for site_page in site.pages %}
{% if site_page.url contains url %}
{% unless site_page.url == indexurl %}
<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>
<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>
{% endunless %}
{% endif %}
{% endfor %}
Expand All @@ -92,7 +92,7 @@ <h5 class="sidebar-title">Chapters Index</h5>

</aside>

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

</body>
</html>
Expand Down
8 changes: 4 additions & 4 deletions authors-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Author's Guide

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

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!
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!

## General Guidelines

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

## Copyright Issues

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.
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.

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.

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

## How to Add a Recipe

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:
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:

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

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

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.
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.

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

Expand Down
6 changes: 3 additions & 3 deletions authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The following people are totally rad and awesome because they have contributed r
* Calum Robertson *http://github.com/randusr836*
* Jake Burkhead *https://github.com/jlburkhead*
* [Alex Johnson](https://github.com/nonsensery)
* ...You! What are you waiting for? Check out the [contributing](/contributing) section and get cracking!
* ...You! What are you waiting for? Check out the [contributing]({{ site.baseurl }}/contributing) section and get cracking!

# Developers

Expand All @@ -34,11 +34,11 @@ The following people are totally rad and awesome because they have contributed r
* Mike Moore *mike@blowmage.com*
* Peter Hellberg *peter@c7.se*
* Jamie Gaskins *jgaskins@gmail.com*
* ...You! What are you waiting for? Check out the [contributing](/contributing) section and get cracking!
* ...You! What are you waiting for? Check out the [contributing]({{ site.baseurl }}/contributing) section and get cracking!

# Designers

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

* [Amsul](http://github.com/amsul) reach@amsul.ca
* ...You! Check out the [contributing](/contributing) section and get cracking!
* ...You! Check out the [contributing]({{ site.baseurl }}/contributing) section and get cracking!
2 changes: 1 addition & 1 deletion chapters/ajax/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% for page in site.pages %}
{% if page.url contains url %}
{% unless page.url == indexurl %}
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
<li><a href="{{ site.baseurl }}{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
{% endunless %}
{% endif %}
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion chapters/arrays/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% for page in site.pages %}
{% if page.url contains url %}
{% unless page.url == indexurl %}
<li><a href="{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
<li><a href="{{ site.baseurl }}{{ page.url | replace: '.html', '' }}">{{ page.title }}</a></li>
{% endunless %}
{% endif %}
{% endfor %}
Expand Down
Loading

0 comments on commit ebfed06

Please sign in to comment.