Skip to content

Commit 54d7c0c

Browse files
committed
Add cookbook section + layout
Adding a cookbook is fairly easy: 1. Add a new file in `cookbook/` directory, such as: cookbook/how-to-do-that.markdown 2. Write at least the following configuration block: --- layout: cookbook title: How To Do That --- 3. Add a link in the `index.markdown` file: * [How To Do That](cookbook/how-to-do-that.html) You are done!
1 parent 9b0a3d6 commit 54d7c0c

File tree

4 files changed

+82
-59
lines changed

4 files changed

+82
-59
lines changed

_layouts/cookbook.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
layout: default
3+
---
4+
5+
<section>
6+
<h1>{{ page.title }}</h1>
7+
8+
{{ content }}
9+
</section>

_layouts/default.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="chrome=1">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
7+
{% if page.title %}
8+
<title>{{ page.title }} | {{ site.name }} - {{ site.description }}</title>
9+
{% else %}
10+
<title>{{ site.name }} - {{ site.description }}</title>
11+
{% endif %}
12+
<link rel="stylesheet" href="/css/main.css">
13+
<link rel="stylesheet" href="/css/pygment_trac.css">
14+
<!--[if lt IE 9]>
15+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
16+
<![endif]-->
17+
</head>
18+
<body>
19+
<div class="wrapper">
20+
<header>
21+
<h1>
22+
<a href="/"><img src="/images/geocoder.png" class="logo" /></a>
23+
</h1>
24+
<p>{{ site.description }}</p>
25+
26+
<p class="view">
27+
<a href="https://github.com/geocoder-php/Geocoder">View the Project on GitHub <small>geocoder-php/Geocoder</small></a>
28+
</p>
29+
30+
<ul>
31+
<li><a href="{{ site.github_base_url }}{{ site.name }}/zipball/master">Download <strong>ZIP File</strong></a></li>
32+
<li><a href="{{ site.github_base_url }}{{ site.name }}/tarball/master">Download <strong>TAR Ball</strong></a></li>
33+
<li><a href="{{ site.github_base_url }}{{ site.name }}">View On <strong>GitHub</strong></a></li>
34+
</ul>
35+
</header>
36+
37+
{{ content }}
38+
39+
<footer>
40+
<p>
41+
This project is maintained by <a href="https://github.com/willdurand">William Durand</a> and
42+
<a href="{{ site.github_base_url }}?tab=members">awesome people</a>.
43+
</p>
44+
<p>
45+
<small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small>
46+
</p>
47+
</footer>
48+
</div>
49+
<script src="/js/scale.fix.js"></script>
50+
<script type="text/javascript">
51+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
52+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
53+
</script>
54+
<script type="text/javascript">
55+
try {
56+
var pageTracker = _gat._getTracker("UA-27331396-1");
57+
pageTracker._trackPageview();
58+
} catch(err) {}
59+
</script>
60+
</body>
61+
</html>

_layouts/home.html

Lines changed: 6 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,7 @@
1-
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="chrome=1">
6-
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
1+
---
2+
layout: default
3+
---
74

8-
<title>{{ site.name }} - {{ site.description }}</title>
9-
10-
<link rel="stylesheet" href="css/main.css">
11-
<link rel="stylesheet" href="css/pygment_trac.css">
12-
13-
<!--[if lt IE 9]>
14-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
15-
<![endif]-->
16-
</head>
17-
<body>
18-
<div class="wrapper">
19-
<header>
20-
<h1>
21-
<a href="/"><img src="/images/geocoder.png" class="logo" /></a>
22-
</h1>
23-
<p>{{ site.description }}</p>
24-
25-
<p class="view">
26-
<a href="https://github.com/geocoder-php/Geocoder">View the Project on GitHub <small>geocoder-php/Geocoder</small></a>
27-
</p>
28-
29-
<ul>
30-
<li><a href="{{ site.github_base_url }}{{ site.name }}/zipball/master">Download <strong>ZIP File</strong></a></li>
31-
<li><a href="{{ site.github_base_url }}{{ site.name }}/tarball/master">Download <strong>TAR Ball</strong></a></li>
32-
<li><a href="{{ site.github_base_url }}{{ site.name }}">View On <strong>GitHub</strong></a></li>
33-
</ul>
34-
</header>
35-
36-
<section>
37-
{{ content }}
38-
</section>
39-
40-
<footer>
41-
<p>
42-
This project is maintained by <a href="https://github.com/willdurand">William Durand</a> and
43-
<a href="{{ site.github_base_url }}?tab=members">awesome people</a>.
44-
</p>
45-
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
46-
</footer>
47-
</div>
48-
<script src="js/scale.fix.js"></script>
49-
<script type="text/javascript">
50-
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
51-
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
52-
</script>
53-
<script type="text/javascript">
54-
try {
55-
var pageTracker = _gat._getTracker("UA-27331396-1");
56-
pageTracker._trackPageview();
57-
} catch(err) {}
58-
</script>
59-
</body>
60-
</html>
5+
<section>
6+
{{ content }}
7+
</section>

index.markdown

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ Here are the links to the official and complete documentation pages:
5353
* [GeocoderBundle documentation (Symfony2)]({{ site.github_base_url }}BazingaGeocoderBundle/blob/master/Resources/doc/index.md#bazingageocoderbundle)
5454

5555

56+
Cookbook
57+
--------
58+
59+
In this cookbook, you will find specific solutions for specific needs.
60+
61+
5662
License
5763
-------
5864

0 commit comments

Comments
 (0)