jekyll 0.12.1 → 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jekyll might be problematic. Click here for more details.

Files changed (124) hide show
  1. data/CONTRIBUTING.md +67 -0
  2. data/Gemfile +1 -1
  3. data/History.txt +50 -6
  4. data/README.textile +10 -6
  5. data/Rakefile +74 -36
  6. data/bin/jekyll +78 -276
  7. data/cucumber.yml +3 -1
  8. data/features/create_sites.feature +1 -1
  9. data/features/drafts.feature +25 -0
  10. data/features/site_configuration.feature +1 -1
  11. data/features/step_definitions/jekyll_steps.rb +13 -3
  12. data/features/support/env.rb +3 -1
  13. data/jekyll.gemspec +73 -17
  14. data/lib/jekyll.rb +31 -21
  15. data/lib/jekyll/command.rb +12 -0
  16. data/lib/jekyll/commands/build.rb +81 -0
  17. data/lib/jekyll/commands/serve.rb +28 -0
  18. data/lib/jekyll/converter.rb +1 -3
  19. data/lib/jekyll/converters/identity.rb +13 -14
  20. data/lib/jekyll/converters/markdown.rb +128 -128
  21. data/lib/jekyll/converters/textile.rb +37 -37
  22. data/lib/jekyll/convertible.rb +6 -4
  23. data/lib/jekyll/core_ext.rb +9 -1
  24. data/lib/jekyll/draft.rb +35 -0
  25. data/lib/jekyll/errors.rb +1 -3
  26. data/lib/jekyll/filters.rb +13 -4
  27. data/lib/jekyll/generator.rb +1 -4
  28. data/lib/jekyll/generators/pagination.rb +46 -46
  29. data/lib/jekyll/layout.rb +0 -2
  30. data/lib/jekyll/mime.types +1588 -0
  31. data/lib/jekyll/page.rb +24 -8
  32. data/lib/jekyll/plugin.rb +0 -2
  33. data/lib/jekyll/post.rb +66 -40
  34. data/lib/jekyll/site.rb +96 -20
  35. data/lib/jekyll/static_file.rb +0 -2
  36. data/lib/jekyll/tags/gist.rb +19 -0
  37. data/lib/jekyll/tags/highlight.rb +63 -62
  38. data/lib/jekyll/tags/include.rb +25 -25
  39. data/lib/jekyll/tags/post_url.rb +30 -25
  40. data/script/bootstrap +2 -0
  41. data/site/.gitignore +4 -0
  42. data/site/CNAME +1 -0
  43. data/site/README +1 -0
  44. data/site/_config.yml +5 -0
  45. data/site/_includes/analytics.html +32 -0
  46. data/site/_includes/docs_contents.html +82 -0
  47. data/site/_includes/footer.html +15 -0
  48. data/site/_includes/header.html +26 -0
  49. data/site/_includes/section_nav.html +22 -0
  50. data/site/_includes/top.html +14 -0
  51. data/site/_layouts/default.html +12 -0
  52. data/site/_layouts/docs.html +21 -0
  53. data/site/_posts/2012-07-01-configuration.md +277 -0
  54. data/site/_posts/2012-07-01-contributing.md +66 -0
  55. data/site/_posts/2012-07-01-deployment-methods.md +108 -0
  56. data/site/_posts/2012-07-01-extras.md +103 -0
  57. data/site/_posts/2012-07-01-frontmatter.md +120 -0
  58. data/site/_posts/2012-07-01-github-pages.md +34 -0
  59. data/site/_posts/2012-07-01-heroku.md +8 -0
  60. data/site/_posts/2012-07-01-home.md +47 -0
  61. data/site/_posts/2012-07-01-installation.md +43 -0
  62. data/site/_posts/2012-07-01-migrations.md +180 -0
  63. data/site/_posts/2012-07-01-pages.md +62 -0
  64. data/site/_posts/2012-07-01-pagination.md +116 -0
  65. data/site/_posts/2012-07-01-permalinks.md +163 -0
  66. data/site/_posts/2012-07-01-plugins.md +384 -0
  67. data/site/_posts/2012-07-01-posts.md +106 -0
  68. data/site/_posts/2012-07-01-resources.md +49 -0
  69. data/site/_posts/2012-07-01-sites.md +28 -0
  70. data/site/_posts/2012-07-01-structure.md +95 -0
  71. data/site/_posts/2012-07-01-templates.md +217 -0
  72. data/site/_posts/2012-07-01-troubleshooting.md +108 -0
  73. data/site/_posts/2012-07-01-usage.md +38 -0
  74. data/site/_posts/2012-07-01-variables.md +166 -0
  75. data/site/css/grid.css +62 -0
  76. data/site/css/normalize.css +504 -0
  77. data/site/css/pygments.css +70 -0
  78. data/site/css/style.css +697 -0
  79. data/site/docs/index.html +11 -0
  80. data/site/favicon.png +0 -0
  81. data/site/img/article-footer.png +0 -0
  82. data/site/img/footer-arrow.png +0 -0
  83. data/site/img/footer-logo.png +0 -0
  84. data/site/img/logo-2x.png +0 -0
  85. data/site/img/octojekyll.png +0 -0
  86. data/site/img/tube.png +0 -0
  87. data/site/img/tube1x.png +0 -0
  88. data/site/index.html +77 -0
  89. data/site/js/modernizr-2.5.3.min.js +4 -0
  90. data/test/fixtures/broken_front_matter2.erb +4 -0
  91. data/test/fixtures/broken_front_matter3.erb +7 -0
  92. data/test/fixtures/exploit_front_matter.erb +4 -0
  93. data/test/helper.rb +16 -0
  94. data/test/source/_posts/2013-01-12-nil-layout.textile +6 -0
  95. data/test/source/_posts/2013-01-12-no-layout.textile +5 -0
  96. data/test/source/contacts/bar.html +5 -0
  97. data/test/source/contacts/index.html +5 -0
  98. data/test/test_configuration.rb +7 -8
  99. data/test/test_convertible.rb +29 -0
  100. data/test/test_core_ext.rb +22 -0
  101. data/test/test_generated_site.rb +1 -1
  102. data/test/test_kramdown.rb +3 -3
  103. data/test/test_page.rb +88 -2
  104. data/test/test_post.rb +42 -6
  105. data/test/test_rdiscount.rb +1 -1
  106. data/test/test_redcarpet.rb +1 -1
  107. data/test/test_redcloth.rb +6 -6
  108. data/test/test_site.rb +73 -8
  109. data/test/test_tags.rb +36 -13
  110. metadata +150 -19
  111. data/lib/jekyll/migrators/csv.rb +0 -26
  112. data/lib/jekyll/migrators/drupal.rb +0 -103
  113. data/lib/jekyll/migrators/enki.rb +0 -49
  114. data/lib/jekyll/migrators/joomla.rb +0 -53
  115. data/lib/jekyll/migrators/marley.rb +0 -52
  116. data/lib/jekyll/migrators/mephisto.rb +0 -84
  117. data/lib/jekyll/migrators/mt.rb +0 -86
  118. data/lib/jekyll/migrators/posterous.rb +0 -67
  119. data/lib/jekyll/migrators/rss.rb +0 -47
  120. data/lib/jekyll/migrators/textpattern.rb +0 -58
  121. data/lib/jekyll/migrators/tumblr.rb +0 -195
  122. data/lib/jekyll/migrators/typo.rb +0 -51
  123. data/lib/jekyll/migrators/wordpress.rb +0 -294
  124. data/lib/jekyll/migrators/wordpressdotcom.rb +0 -70
@@ -0,0 +1,49 @@
1
+ ---
2
+ layout: docs
3
+ title: Resources
4
+ prev_section: sites
5
+ ---
6
+
7
+ Jekyll’s growing use is producing a wide variety of tutorials, frameworks, extensions, examples, and other resources that can be very helpful. Below is a collection of links to some of the most popular Jekyll resources.
8
+
9
+ ### Jekyll tips & tricks, and examples
10
+
11
+ - [A simple way to add draft posts](https://gist.github.com/2870636)
12
+
13
+ No plugins required.
14
+
15
+ - [Tips for working with GitHub Pages Integration](https://gist.github.com/2890453)
16
+
17
+ Code example reuse, and keeping documentation up to date.
18
+
19
+ - [Use Simple Form to integrate a simple contact
20
+ form](http://getsimpleform.com/)
21
+ - [JekyllBootstrap.com](http://jekyllbootstrap.com)
22
+
23
+ Provides detailed explanations, examples, and helper-code to make
24
+ getting started with Jekyll easier.
25
+
26
+ ### Tutorials
27
+
28
+ #### Integrating Jekyll with Git
29
+
30
+ - [Blogging with Git, Emacs and Jekyll](http://metajack.im/2009/01/23/blogging-with-git-emacs-and-jekyll/)
31
+ - [Using Git to maintain your blog](http://matedriven.com.ar/2009/04/28/using-git-to-maintain-your-blog.html) (step by step guide)
32
+
33
+ #### Other hacks
34
+
35
+ - [Integrating Twitter with Jekyll](http://www.justkez.com/integrating-twitter-with-jekyll/)
36
+ > “Having migrated Justkez.com to be based on Jekyll, I was pondering how I might include my recent twitterings on the front page of the site. In the Wordpress world, this would have been done via a plugin which may or may not have hung the loading of the page, might have employed caching, but would certainly have had some overheads. … Not in Jekyll.”
37
+ - [‘My Jekyll Fork’, by Mike West](http://mikewest.org/2009/11/my-jekyll-fork)
38
+ > “Jekyll is a well-architected throwback to a time before Wordpress, when men were men, and HTML was static. I like the ideas it espouses, and have made a few improvements to it’s core. Here, I’ll point out some highlights of my fork in the hopes that they see usage beyond this site.”
39
+ - [‘About this Website’, by Carter Allen](http://cartera.me/2010/08/12/about-this-website/)
40
+ > “Jekyll is everything that I ever wanted in a blogging engine. Really. It isn’t perfect, but what’s excellent about it is that if there’s something wrong, I know exactly how it works and how to fix it. It runs on the your machine only, and is essentially an added”build" step between you and the browser. I coded this entire site in TextMate using standard HTML5 and CSS3, and then at the end I added just a few little variables to the markup. Presto-chango, my site is built and I am at peace with the world.”
41
+ - [Generating a Tag Cloud in Jekyll](http://www.justkez.com/generating-a-tag-cloud-in-jekyll/)
42
+
43
+ A guide to implementing a tag cloud and per-tag content pages using Jekyll.
44
+
45
+ - [Jekyll Extensions -= Pain](http://rfelix.com/2010/01/19/jekyll-extensions-minus-equal-pain/)
46
+
47
+ A way to [extend Jekyll](http://github.com/rfelix/jekyll_ext) without forking and modifying the Jekyll gem codebase and some [portable Jekyll extensions](http://wiki.github.com/rfelix/jekyll_ext/extensions) that can be reutilized and shared.
48
+
49
+ - [Using your Rails layouts in Jekyll](http://numbers.brighterplanet.com/2010/08/09/sharing-rails-views-with-jekyll)
@@ -0,0 +1,28 @@
1
+ ---
2
+ layout: docs
3
+ title: Sites using Jekyll
4
+ prev_section: troubleshooting
5
+ next_section: resources
6
+ ---
7
+
8
+ It’s interesting to see what designs and features others have come up
9
+ with. Below are some Jekyll-powered blogs which were hand-picked for
10
+ learning purposes.
11
+
12
+ - [Tom Preston-Werner](http://tom.preston-werner.com/)
13
+ ([source](http://github.com/mojombo/mojombo.github.com))
14
+ - [Nick Quaranto](http://quaran.to/)
15
+ ([source](https://github.com/qrush/qrush.github.com))
16
+ - [Roger Chapman](http://rogchap.com/)
17
+ ([source](https://github.com/rogchap/rogchap.github.com))
18
+ - [GitHub Official Teaching Materials](http://teach.github.com)
19
+ ([source](https://github.com/github/teach.github.com))
20
+ - [Rasmus Andersson](http://rsms.me/)
21
+ ([source](https://github.com/rsms/rsms.github.com))
22
+ - [Scott Chacon](http://schacon.github.com)
23
+ ([source](https://github.com/schacon/schacon.github.com))
24
+
25
+ If you would like to explore more examples, you can find a list of sites
26
+ and their sources on the ["Sites" page in the Jekyll wiki][jekyll-sites].
27
+
28
+ [jekyll-sites]: https://github.com/mojombo/jekyll/wiki/Sites
@@ -0,0 +1,95 @@
1
+ ---
2
+ layout: docs
3
+ title: Directory structure
4
+ prev_section: usage
5
+ next_section: configuration
6
+ ---
7
+
8
+ Jekyll at its core is a text transformation engine. The concept behind the system is this: you give it text written in your favorite markup language, be that Markdown, Textile, or just plain HTML, and it churns that through a layout or series of layout files. Throughout that process you can tweak how you want the site URLs to look, what data gets displayed on the layout and more. This is all done through strictly editing files, and the web interface is the final product.
9
+
10
+ A basic Jekyll site usually looks something like this:
11
+
12
+ {% highlight bash %}
13
+ .
14
+ ├── _config.yml
15
+ ├── _includes
16
+ | ├── footer.html
17
+ | └── header.html
18
+ ├── _layouts
19
+ | ├── default.html
20
+ | └── post.html
21
+ ├── _posts
22
+ | ├── 2007-10-29-why-every-programmer-should-play-nethack.textile
23
+ | └── 2009-04-26-barcamp-boston-4-roundup.textile
24
+ ├── _site
25
+ └── index.html
26
+ {% endhighlight %}
27
+
28
+ An overview of what each of these does:
29
+
30
+ <table>
31
+ <thead>
32
+ <tr>
33
+ <th>File / Directory</th>
34
+ <th>Description</th>
35
+ </tr>
36
+ </thead>
37
+ <tbody>
38
+ <tr>
39
+ <td>
40
+ <p><code>_config.yml</code></p>
41
+ </td>
42
+ <td>
43
+ <p>Stores <a href="../configuration">configuration</a> data. A majority of these options can be specified from the command line executable but it’s easier to throw them in here so you don’t have to remember them.</p>
44
+ </td>
45
+ </tr>
46
+ <tr>
47
+ <td>
48
+ <p><code>_includes</code></p>
49
+ </td>
50
+ <td>
51
+ <p>These are the partials that can be mixed and matched by your _layouts and _posts to facilitate reuse. The liquid tag <code>{{ "{% include file.ext " }}%}</code> can be used to include the partial in <code>_includes/file.ext</code>.</p>
52
+ </td>
53
+ </tr>
54
+ <tr>
55
+ <td>
56
+ <p><code>_layouts</code></p>
57
+ </td>
58
+ <td>
59
+ <p>These are the templates which posts are inserted into. Layouts are chosen on a post-by-post basis in the <a href="../frontmatter">YAML front matter</a>, which is described in the next section. The liquid tag <code>{{ "{{ content " }}}}</code> is used to inject data onto the page.</p>
60
+ </td>
61
+ </tr>
62
+ <tr>
63
+ <td>
64
+ <p><code>_posts</code></p>
65
+ </td>
66
+ <td>
67
+ <p>Your dynamic content, so to speak. The format of these files is important, as named as <code>YEAR-MONTH-DAY-title.MARKUP</code>. The <a href="../permalinks">permalinks</a> can be adjusted very flexibly for each post, but the date and markup language are determined solely by the file name.</p>
68
+ </td>
69
+ </tr>
70
+ <tr>
71
+ <td>
72
+ <p><code>_site</code></p>
73
+ </td>
74
+ <td>
75
+ <p>This is where the generated site will be placed once Jekyll is done transforming it. It's probably a good idea to add this to your <code>.gitignore</code> file.</p>
76
+ </td>
77
+ </tr>
78
+ <tr>
79
+ <td>
80
+ <p><code>index.html</code> and other HTML, Markdown, Textile files</p>
81
+ </td>
82
+ <td>
83
+ <p>Provided that the file has a <a href="../frontmatter">YAML Front Matter</a> section, it will be transformed by Jekyll. The same will happen for any <code>.html</code>, <code>.markdown</code>, <code>.md</code>, or <code>.textile</code> file in your site's root directory or directories not listed above.</p>
84
+ </td>
85
+ </tr>
86
+ <tr>
87
+ <td>
88
+ <p>Other Files/Folders</p>
89
+ </td>
90
+ <td>
91
+ <p>Every other directory and file except for those listed above—such as <code>css</code> and <code>images</code> folders, <code>favicon.ico</code> files, and so forth—will be transferred over verbatim to the generated site. There's plenty of <a href="../sites">sites already using Jekyll</a> if you're curious as to how they're laid out.</p>
92
+ </td>
93
+ </tr>
94
+ </tbody>
95
+ </table>
@@ -0,0 +1,217 @@
1
+ ---
2
+ layout: docs
3
+ title: Templates
4
+ prev_section: migrations
5
+ next_section: permalinks
6
+ ---
7
+
8
+ Jekyll uses the [Liquid](http://www.liquidmarkup.org/) templating language to process templates. All of the [standard Liquid tags and filters](http://wiki.github.com/shopify/liquid/liquid-for-designers) are supported, Jekyll even adds a few handy filters and tags of its own to make common tasks easier.
9
+
10
+ ## Filters
11
+
12
+ <table>
13
+ <thead>
14
+ <tr>
15
+ <th>Description</th>
16
+ <th><span class="filter">Filter</span> and <span class="output">Output</span></th>
17
+ </tr>
18
+ </thead>
19
+ <tbody>
20
+ <tr>
21
+ <td>
22
+ <p class='name'><strong>Date to XML Schema</strong></p>
23
+ <p>Convert a Date into XML Schema format.</p>
24
+ </td>
25
+ <td class='align-center'>
26
+ <p>
27
+ <code class='filter'>{{ "{{ site.time | date_to_xmlschema " }}}}</code>
28
+ </p>
29
+ <p>
30
+ <code class='output'>2008-11-17T13:07:54-08:00</code>
31
+ </p>
32
+ </td>
33
+ </tr>
34
+ <tr>
35
+ <td>
36
+ <p class='name'><strong>Date to String</strong></p>
37
+ <p>Convert a date to short format.</p>
38
+ </td>
39
+ <td class='align-center'>
40
+ <p>
41
+ <code class='filter'>{{ "{{ site.time | date_to_string " }}}}</code>
42
+ </p>
43
+ <p>
44
+ <code class='output'>17 Nov 2008</code>
45
+ </p>
46
+ </td>
47
+ </tr>
48
+ <tr>
49
+ <td>
50
+ <p class='name'><strong>Date to Long String</strong></p>
51
+ <p>Format a date to long format.</p>
52
+ </td>
53
+ <td class='align-center'>
54
+ <p>
55
+ <code class='filter'>{{ "{{ site.time | date_to_long_string " }}}}</code>
56
+ </p>
57
+ <p>
58
+ <code class='output'>17 November 2008</code>
59
+ </p>
60
+ </td>
61
+ </tr>
62
+ <tr>
63
+ <td>
64
+ <p class='name'><strong>XML Escape</strong></p>
65
+ <p>Escape some text for use in XML.</p>
66
+ </td>
67
+ <td class='align-center'>
68
+ <p>
69
+ <code class='filter'>{{ "{{ page.content | xml_escape " }}}}</code>
70
+ </p>
71
+ </td>
72
+ </tr>
73
+ <tr>
74
+ <td>
75
+ <p class='name'><strong>CGI Escape</strong></p>
76
+ <p>CGI escape a string for use in a URL. Replaces any special characters with appropriate %XX replacements.</p>
77
+ </td>
78
+ <td class='align-center'>
79
+ <p>
80
+ <code class='filter'>{{ "{{ “foo,bar;baz?” | cgi_escape " }}}}</code>
81
+ </p>
82
+ <p>
83
+ <code class='output'>foo%2Cbar%3Bbaz%3F</code>
84
+ </p>
85
+ </td>
86
+ </tr>
87
+ <tr>
88
+ <td>
89
+ <p class='name'><strong>Number of Words</strong></p>
90
+ <p>Count the number of words in some text.</p>
91
+ </td>
92
+ <td class='align-center'>
93
+ <p>
94
+ <code class='filter'>{{ "{{ page.content | number_of_words " }}}}</code>
95
+ </p>
96
+ <p>
97
+ <code class='output'>1337</code>
98
+ </p>
99
+ </td>
100
+ </tr>
101
+ <tr>
102
+ <td>
103
+ <p class='name'><strong>Array to Sentence</strong></p>
104
+ <p>Convert an array into a sentence. Useful for listing tags.</p>
105
+ </td>
106
+ <td class='align-center'>
107
+ <p>
108
+ <code class='filter'>{{ "{{ page.tags | array_to_sentence_string " }}}}</code>
109
+ </p>
110
+ <p>
111
+ <code class='output'>foo, bar, and baz</code>
112
+ </p>
113
+ </td>
114
+ </tr>
115
+ <tr>
116
+ <td>
117
+ <p class='name'><strong>Textilize</strong></p>
118
+ <p>Convert a Textile-formatted string into HTML, formatted via RedCloth</p>
119
+ </td>
120
+ <td class='align-center'>
121
+ <p>
122
+ <code class='filter'>{{ "{{ page.excerpt | textilize " }}}}</code>
123
+ </p>
124
+ </td>
125
+ </tr>
126
+ <tr>
127
+ <td>
128
+ <p class='name'><strong>Markdownify</strong></p>
129
+ <p>Convert a Markdown-formatted string into HTML.</p>
130
+ </td>
131
+ <td class='align-center'>
132
+ <p>
133
+ <code class='filter'>{{ "{{ page.excerpt | markdownify " }}}}</code>
134
+ </p>
135
+ </td>
136
+ </tr>
137
+ </tbody>
138
+ </table>
139
+
140
+ ## Tags
141
+
142
+ ### Includes (Partials)
143
+
144
+ If you have small page fragments that you wish to include in multiple
145
+ places on your site, you can use the `include` tag.
146
+
147
+ {% highlight ruby %}
148
+ {{ "{% include sig.textile " }}%}
149
+ {% endhighlight %}
150
+
151
+ Jekyll expects all include files to be placed in an `_includes`
152
+ directory at the root of your source dir. So this will embed the
153
+ contents of `/path/to/your/site/_includes/sig.textile` into the calling
154
+ file.
155
+
156
+ ### Code snippet highlighting
157
+
158
+ Jekyll has built in support for syntax highlighting of [over 100
159
+ languages](http://pygments.org/languages/) thanks to
160
+ [Pygments](http://pygments.org/). In order to take advantage of this
161
+ you’ll need to have Pygments installed, and the `pygmentize` binary must
162
+ be in your `$PATH`. When you run Jekyll, make sure you run it with
163
+ [Pygments enabled](../extras).
164
+
165
+ To render a code block with syntax highlighting, surround your code as follows:
166
+
167
+ {% highlight ruby %}
168
+ {{ "{% highlight ruby " }}%}
169
+ def foo
170
+ puts 'foo'
171
+ end
172
+ {{ "{% endhighlight " }}%}
173
+ {% endhighlight %}
174
+
175
+ The argument to the `highlight` tag (`ruby` in the example above) is the language identifier. To find the appropriate identifier to use for the language you want to highlight, look for the “short name” on the [Lexers page](http://pygments.org/docs/lexers/).
176
+
177
+ #### Line numbers
178
+
179
+ There is a second argument to `highlight` called `linenos` that is
180
+ optional. Including the `linenos` argument will force the highlighted
181
+ code to include line numbers. For instance, the following code block
182
+ would include line numbers next to each line:
183
+
184
+ {% highlight ruby %}
185
+ {{ "{% highlight ruby linenos " }}%}
186
+ def foo
187
+ puts 'foo'
188
+ end
189
+ {{ "{% endhighlight " }}%}
190
+ {% endhighlight %}
191
+
192
+ #### Stylesheets for syntax highlighting
193
+
194
+ In order for the highlighting to show up, you’ll need to include a
195
+ highlighting stylesheet. For an example stylesheet you can look at
196
+ [syntax.css](http://github.com/mojombo/tpw/tree/master/css/syntax.css).
197
+ These are the same styles as used by GitHub and you are free to use them
198
+ for your own site. If you use linenos, you might want to include an
199
+ additional CSS class definition for the `.lineno` class in `syntax.css` to
200
+ distinguish the line numbers from the highlighted code.
201
+
202
+ ### Post URL
203
+
204
+ If you would like to include a link to a post on your site, the `post_url` tag will generate the correct permalink URL for the post you specify.
205
+
206
+ {% highlight bash %}
207
+ {{ "{% post_url 2010-07-21-name-of-post " }}%}
208
+ {% endhighlight %}
209
+
210
+ There is no need to include the file extension when using the `post_url` tag.
211
+
212
+ You can also use this tag to create a link to a post in Markdown as follows:
213
+
214
+ {% highlight html %}
215
+ [Name of Link]({{ "{% post_url 2010-07-21-name-of-post " }}%})
216
+ {% endhighlight %}
217
+
@@ -0,0 +1,108 @@
1
+ ---
2
+ layout: docs
3
+ title: Troubleshooting
4
+ prev_section: contributing
5
+ next_section: sites
6
+ ---
7
+
8
+ If you ever run into problems installing or using Jekyll, here’s a few tips that might be of help. If the problem you’re experiencing isn’t covered below, please [report an issue](https://github.com/mojombo/jekyll/issues/new) so the Jekyll community can make everyone’s experience better.
9
+
10
+ ## Installation Problems
11
+
12
+ If you encounter errors during gem installation, you may need to install
13
+ the header files for compiling extension modules for ruby 1.9.1. This
14
+ can be done on Ubunutu or Debian by running:
15
+
16
+ {% highlight bash %}
17
+ sudo apt-get install ruby1.9.1-dev
18
+ {% endhighlight %}
19
+
20
+ On Red Hat, CentOS, and Fedora systems you can do this by running:
21
+
22
+ {% highlight bash %}
23
+ sudo yum install ruby-devel
24
+ {% endhighlight %}
25
+
26
+ On [NearlyFreeSpeech](http://nearlyfreespeech.net/) you need to run the command with the following environment variable:
27
+
28
+ {% highlight bash %}
29
+ RB_USER_INSTALL=true gem install jekyll
30
+ {% endhighlight %}
31
+
32
+ On OSX, you may need to update RubyGems:
33
+
34
+ {% highlight bash %}
35
+ sudo gem update --system
36
+ {% endhighlight %}
37
+
38
+ To install RubyGems on Gentoo:
39
+
40
+ {% highlight bash %}
41
+ sudo emerge -av dev-ruby/rubygems
42
+ {% endhighlight %}
43
+
44
+ On Windows, you may need to install [RubyInstaller
45
+ DevKit](http://wiki.github.com/oneclick/rubyinstaller/development-kit).
46
+
47
+ ## Problems running Jekyll
48
+
49
+ On Debian or Ubuntu, you may need to add /var/lib/gems/1.8/bin/ to your path in order to have the `jekyll` executable be available in your Terminal.
50
+
51
+ ## Base-URL Problems
52
+
53
+ If you are using base-url option like `jekyll serve --baseurl '/blog'` then make sure that you access the site at `http://localhost:4000/blog/index.html`. Just accessing `http://localhost:4000/blog` will not work.
54
+
55
+ ## Configuration problems
56
+
57
+
58
+ The order of precedence for conflicting [configuration settings](../configuration) is as follows:
59
+
60
+ 1. Command-line flags
61
+ 2. Configuration file settings
62
+ 3. Defaults
63
+
64
+ That is: defaults are overridden by options specified in `_config.yml`, and flags specified at the command-line will override all other settings specified elsewhere.
65
+
66
+ ## Markup Problems
67
+
68
+ The various markup engines that Jekyll uses may have some issues. This
69
+ page will document them to help others who may run into the same
70
+ problems.
71
+
72
+ ### Maruku
73
+
74
+ If your link has characters that need to be escaped, you need to use
75
+ this syntax:
76
+
77
+ `![Alt text](http://yuml.me/diagram/class/[Project]->[Task])`
78
+
79
+ If you have an empty tag, i.e. `<script src="js.js"></script>`, Maruku
80
+ transforms this into `<script src="js.js" />`. This causes problems in
81
+ Firefox and possibly other browsers and is [discouraged in
82
+ XHTML.](http://www.w3.org/TR/xhtml1/#C_3) An easy fix is to put a space
83
+ between the opening and closing tags.
84
+
85
+ ### RedCloth
86
+
87
+ Versions 4.1.1 and higher do not obey the notextile tag. [This is a known
88
+ bug](http://aaronqian.com/articles/2009/04/07/redcloth-ate-my-notextile.html)
89
+ and will hopefully be fixed for 4.2. You can still use 4.1.9, but the
90
+ test suite requires that 4.1.0 be installed. If you use a version of
91
+ RedCloth that does not have the notextile tag, you may notice that
92
+ syntax highlighted blocks from Pygments are not formatted correctly,
93
+ among other things. If you’re seeing this just install 4.1.0.
94
+
95
+ ### Liquid
96
+
97
+ The latest version, version 2.0, seems to break the use of `{{ "{{" }}` in
98
+ templates. Unlike previous versions, using `{{ "{{" }}` in 2.0 triggers the
99
+ following error:
100
+
101
+ {% highlight bash %}
102
+ '{{ "{{" }}' was not properly terminated with regexp: /\}\}/ (Liquid::SyntaxError)
103
+ {% endhighlight %}
104
+
105
+ <div class="note">
106
+ <h5>Please report issues you encounter!</h5>
107
+ <p>If you come across a bug, please <a href="https://github.com/mojombo/jekyll/issues/new">create an issue</a> on GitHub describing the problem and any work-arounds you find so we can document it here for others.</p>
108
+ </div>