tigefa 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. data/History.markdown +0 -144
  2. data/LICENSE +1 -1
  3. data/README.markdown +6 -10
  4. data/Rakefile +6 -13
  5. data/bin/tigefa +22 -26
  6. data/features/create_sites.feature +0 -11
  7. data/features/include_tag.feature +0 -22
  8. data/features/markdown.feature +4 -41
  9. data/features/site_configuration.feature +4 -33
  10. data/features/site_data.feature +4 -4
  11. data/features/step_definitions/{tigefa_steps.rb → jekyll_steps.rb} +17 -32
  12. data/features/support/env.rb +2 -38
  13. data/lib/site_template/_config.yml +2 -2
  14. data/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb +1 -0
  15. data/lib/site_template/css/main.css +15 -15
  16. data/lib/tigefa.rb +2 -5
  17. data/lib/tigefa/cleaner.rb +8 -8
  18. data/lib/tigefa/commands/build.rb +8 -14
  19. data/lib/tigefa/commands/new.rb +1 -1
  20. data/lib/tigefa/commands/serve.rb +0 -2
  21. data/lib/tigefa/configuration.rb +5 -21
  22. data/lib/tigefa/converters/markdown/kramdown_parser.rb +1 -1
  23. data/lib/tigefa/converters/markdown/maruku_parser.rb +1 -6
  24. data/lib/tigefa/convertible.rb +6 -17
  25. data/lib/tigefa/core_ext.rb +0 -19
  26. data/lib/tigefa/deprecator.rb +1 -1
  27. data/lib/tigefa/filters.rb +2 -12
  28. data/lib/tigefa/generators/pagination.rb +6 -9
  29. data/lib/tigefa/page.rb +1 -1
  30. data/lib/tigefa/post.rb +4 -4
  31. data/lib/tigefa/related_posts.rb +1 -1
  32. data/lib/tigefa/site.rb +50 -90
  33. data/lib/tigefa/stevenson.rb +4 -4
  34. data/lib/tigefa/tags/gist.rb +1 -9
  35. data/lib/tigefa/tags/highlight.rb +1 -1
  36. data/lib/tigefa/tags/include.rb +32 -75
  37. data/lib/tigefa/tags/post_url.rb +4 -6
  38. data/lib/tigefa/url.rb +0 -2
  39. data/site/_includes/docs_contents.html +1 -1
  40. data/site/_includes/docs_contents_mobile.html +1 -1
  41. data/site/_includes/top.html +1 -1
  42. data/site/docs/configuration.md +0 -19
  43. data/site/docs/deployment-methods.md +3 -3
  44. data/site/docs/drafts.md +3 -4
  45. data/site/docs/history.md +3 -147
  46. data/site/docs/installation.md +0 -10
  47. data/site/docs/migrations.md +240 -3
  48. data/site/docs/pages.md +7 -7
  49. data/site/docs/pagination.md +37 -16
  50. data/site/docs/plugins.md +7 -72
  51. data/site/docs/posts.md +1 -1
  52. data/site/docs/structure.md +0 -17
  53. data/site/docs/templates.md +7 -40
  54. data/site/docs/upgrading.md +3 -3
  55. data/site/docs/usage.md +1 -1
  56. data/site/docs/variables.md +2 -2
  57. data/test/helper.rb +1 -4
  58. data/test/test_configuration.rb +7 -16
  59. data/test/test_convertible.rb +1 -1
  60. data/test/test_excerpt.rb +3 -3
  61. data/test/test_filters.rb +0 -11
  62. data/test/test_generated_site.rb +1 -1
  63. data/test/test_kramdown.rb +5 -32
  64. data/test/test_new_command.rb +1 -1
  65. data/test/test_page.rb +0 -10
  66. data/test/test_post.rb +1 -12
  67. data/test/test_redcloth.rb +3 -3
  68. data/test/test_site.rb +64 -58
  69. data/test/test_tags.rb +35 -68
  70. data/tigefa.gemspec +15 -39
  71. metadata +101 -126
  72. checksums.yaml +0 -7
  73. data/features/data.feature +0 -65
  74. data/lib/tigefa/entry_filter.rb +0 -35
  75. data/site/_posts/2013-10-28-jekyll-1-3-0-rc1-released.markdown +0 -19
  76. data/site/_posts/2013-11-04-jekyll-1-3-0-released.markdown +0 -43
  77. data/site/_posts/2013-11-26-jekyll-1-3-1-released.markdown +0 -21
  78. data/site/_posts/2013-12-07-jekyll-1-4-0-released.markdown +0 -30
  79. data/site/_posts/2013-12-16-jekyll-1-4-2-released.markdown +0 -18
  80. data/site/_posts/2014-01-13-jekyll-1-4-3-released.markdown +0 -27
  81. data/site/docs/datafiles.md +0 -63
  82. data/test/source/_config.dev.toml +0 -2
  83. data/test/source/_data/languages.yml +0 -2
  84. data/test/source/_data/members.yaml +0 -7
  85. data/test/source/_data/products.yml +0 -1
  86. data/test/source/_includes/tmp +0 -1
  87. data/test/source/_layouts/post/simple.html +0 -1
  88. data/test/source/_posts/2014-01-06-permalink-traversal.md +0 -5
  89. data/test/source/exploit.md +0 -5
  90. data/test/source/products.yml +0 -4
  91. data/test/source/symlink-test/_data +0 -1
  92. data/test/test_entry_filter.rb +0 -74
@@ -46,16 +46,6 @@ installing Jekyll, check out the [troubleshooting](../troubleshooting/) page or
46
46
  [report an issue]({{ site.repository }}/issues/new) so the Jekyll
47
47
  community can improve the experience for everyone.
48
48
 
49
- <div class="note info">
50
- <h5>Installing Xcode Command-Line Tools</h5>
51
- <p>
52
- If you run into issues installing Jekyll's dependencies which make use of
53
- native extensions and are using Mac OS X, you will need to install Xcode
54
- and the Command-Line Tools it ships with. Download in
55
- <code>Preferences &#8594; Downloads &#8594; Components</code>.
56
- </p>
57
- </div>
58
-
59
49
  ## Optional Extras
60
50
 
61
51
  There are a number of (optional) extra features that Jekyll supports that you
@@ -1,11 +1,248 @@
1
1
  ---
2
2
  layout: docs
3
3
  title: Blog migrations
4
- prev_section: datafiles
4
+ prev_section: variables
5
5
  next_section: templates
6
6
  permalink: /docs/migrations/
7
7
  ---
8
8
 
9
9
  If you’re switching to Jekyll from another blogging system, Jekyll’s importers
10
- can help you with the move. To learn more about importing your site to Jekyll,
11
- visit our [`jekyll-import` docs site](http://import.jekyllrb.com).
10
+ can help you with the move. Most methods listed on this page require read access
11
+ to the database from your old system to generate posts for Jekyll. Each method
12
+ generates `.markdown` posts in the `_posts` directory based on the entries in
13
+ the foreign system.
14
+
15
+ ## Preparing for migrations
16
+
17
+ Because the importers have many of their own dependencies, they are made
18
+ available via a separate gem called
19
+ [`jekyll-import`](https://github.com/jekyll/jekyll-import). To use them, all
20
+ you need to do is install the gem, and they will become available as part of
21
+ Jekyll's standard command line interface.
22
+
23
+ {% highlight bash %}
24
+ $ gem install jekyll-import --pre
25
+ {% endhighlight %}
26
+
27
+ You should now be all set to run the importers below. If you ever get stuck, you
28
+ can see help for each importer:
29
+
30
+ {% highlight bash %}
31
+ $ jekyll help import # => See list of importers
32
+ $ jekyll help import IMPORTER # => See importer specific help
33
+ {% endhighlight %}
34
+
35
+ Where IMPORTER is the name of the specific importer.
36
+
37
+ <div class="note info">
38
+ <h5>Note: Always double-check migrated content</h5>
39
+ <p>
40
+
41
+ Importers may not distinguish between published or private posts, so
42
+ you should always check that the content Jekyll generates for you appears as
43
+ you intended.
44
+
45
+ </p>
46
+ </div>
47
+
48
+ <!-- TODO all these need to be fixed -->
49
+
50
+ ## WordPress
51
+
52
+ ### WordPress export files
53
+
54
+ If hpricot is not already installed, you will need to run `gem install hpricot`.
55
+ Next, export your blog using the WordPress export utility. Assuming that the
56
+ exported file is saved as `wordpress.xml`, here is the command you need to run:
57
+
58
+ {% highlight bash %}
59
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpressdotcom";
60
+ JekyllImport::WordpressDotCom.process({ :source => "wordpress.xml" })'
61
+ {% endhighlight %}
62
+
63
+ <div class="note">
64
+ <h5>ProTip™: WordPress.com Export Tool</h5>
65
+ <p markdown="1">If you are migrating from a WordPress.com account, you can
66
+ access the export tool at the following URL:
67
+ `https://YOUR-USER-NAME.wordpress.com/wp-admin/export.php`.</p>
68
+ </div>
69
+
70
+ ### Using WordPress MySQL server connection
71
+
72
+ If you want to import using a direct connection to the WordPress MySQL server,
73
+ here's how:
74
+
75
+ {% highlight bash %}
76
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpress";
77
+ JekyllImport::WordPress.process({:database => "database", :user => "user", :pass => "pass"})'
78
+ {% endhighlight %}
79
+
80
+ If you are using Webfaction and have to set up an [SSH
81
+ tunnel](http://docs.webfaction.com/user-guide/databases.html?highlight=mysql#starting-an-ssh-tunnel-with-ssh),
82
+ be sure to make the hostname (`127.0.0.1`) explicit, otherwise MySQL may block
83
+ your access based on `localhost` and `127.0.0.1` not being equivalent in its
84
+ authentication system:
85
+
86
+ {% highlight bash %}
87
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpress";
88
+ JekyllImport::WordPress.process("database", "user", "pass", "127.0.0.1")'
89
+ {% endhighlight %}
90
+
91
+ ### Further WordPress migration alternatives
92
+
93
+ While the above methods work, they do not import much of the metadata that is
94
+ usually stored in WordPress posts and pages. If you need to export things like
95
+ pages, tags, custom fields, image attachments and so on, the following resources
96
+ might be useful to you:
97
+
98
+ - [Exitwp](https://github.com/thomasf/exitwp) is a configurable tool written in
99
+ Python for migrating one or more WordPress blogs into Jekyll (Markdown) format
100
+ while keeping as much metadata as possible. Exitwp also downloads attachments
101
+ and pages.
102
+ - [A great
103
+ article](http://vitobotta.com/how-to-migrate-from-wordpress-to-jekyll/) with a
104
+ step-by-step guide for migrating a WordPress blog to Jekyll while keeping most
105
+ of the structure and metadata.
106
+ - [wpXml2Jekyll](https://github.com/theaob/wpXml2Jekyll) is an executable
107
+ windows application for creating Markdown posts from your WordPress XML file.
108
+
109
+ ## Drupal
110
+
111
+ If you’re migrating from [Drupal](http://drupal.org), there are two migrators
112
+ for you, depending upon your Drupal version:
113
+ - [Drupal 6](https://github.com/jekyll/jekyll-import/blob/v0.1.0.beta1/lib/jekyll/jekyll-import/drupal6.rb)
114
+ - [Drupal 7](https://github.com/jekyll/jekyll-import/blob/v0.1.0.beta1/lib/jekyll/jekyll-import/drupal7.rb)
115
+
116
+ {% highlight bash %}
117
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal6";
118
+ JekyllImport::Drupal6.process("dbname", "user", "pass")'
119
+ # ... or ...
120
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal7";
121
+ JekyllImport::Drupal7.process("dbname", "user", "pass")'
122
+ {% endhighlight %}
123
+
124
+ If you are connecting to a different host or need to specify a table prefix for
125
+ your database, you may optionally add those two parameters to the end of either
126
+ Drupal migrator execution:
127
+
128
+ {% highlight bash %}
129
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal6";
130
+ JekyllImport::Drupal6.process("dbname", "user", "pass", "host", "table_prefix")'
131
+ # ... or ...
132
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal7";
133
+ JekyllImport::Drupal7.process("dbname", "user", "pass", "host", "table_prefix")'
134
+ {% endhighlight %}
135
+
136
+ ## Movable Type
137
+
138
+ To import posts from Movable Type:
139
+
140
+ {% highlight bash %}
141
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/mt";
142
+ JekyllImport::MT.process("database", "user", "pass")'
143
+ {% endhighlight %}
144
+
145
+ ## Typo
146
+
147
+ To import posts from Typo:
148
+
149
+ {% highlight bash %}
150
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/typo";
151
+ JekyllImport::Typo.process("database", "user", "pass")'
152
+ {% endhighlight %}
153
+
154
+ This code has only been tested with Typo version 4+.
155
+
156
+ ## TextPattern
157
+
158
+ To import posts from TextPattern:
159
+
160
+ {% highlight bash %}
161
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/textpattern";
162
+ JekyllImport::TextPattern.process("database_name", "username", "password", "hostname")'
163
+ {% endhighlight %}
164
+
165
+ You will need to run the above from the parent directory of your `_import`
166
+ folder. For example, if `_import` is located in `/path/source/_import`, you will
167
+ need to run this code from `/path/source`. The hostname defaults to `localhost`,
168
+ all other variables are required. You may need to adjust the code used to filter
169
+ entries. Left alone, it will attempt to pull all entries that are live or
170
+ sticky.
171
+
172
+ ## Mephisto
173
+
174
+ To import posts from Mephisto:
175
+
176
+ {% highlight bash %}
177
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/mephisto";
178
+ JekyllImport::Mephisto.process("database", "user", "password")'
179
+ {% endhighlight %}
180
+
181
+ If your data is in Postgres, you should do this instead:
182
+
183
+ {% highlight bash %}
184
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/mephisto";
185
+ JekyllImport::Mephisto.postgres({:database => "database", :username=>"username", :password =>"password"})'
186
+ {% endhighlight %}
187
+
188
+ ## Blogger (Blogspot)
189
+
190
+ To import posts from Blogger, see [this post about migrating from Blogger to
191
+ Jekyll](http://blog.coolaj86.com/articles/migrate-from-blogger-to-jekyll.html). If
192
+ that doesn’t work for you, you might want to try some of the following
193
+ alternatives:
194
+
195
+ - [@kennym](https://github.com/kennym) created a [little migration
196
+ script](https://gist.github.com/1115810), because the solutions in the
197
+ previous article didn't work out for him.
198
+ - [@ngauthier](https://github.com/ngauthier) created [another
199
+ importer](https://gist.github.com/1506614) that imports comments, and does so
200
+ via blogger’s archive instead of the RSS feed.
201
+ - [@juniorz](https://github.com/juniorz) created [yet another
202
+ importer](https://gist.github.com/1564581) that works for
203
+ [Octopress](http://octopress.org). It is like [@ngauthier’s
204
+ version](https://gist.github.com/1506614) but separates drafts from posts, as
205
+ well as importing tags and permalinks.
206
+
207
+ ## Posterous
208
+
209
+ To import posts from your primary Posterous blog:
210
+
211
+ {% highlight bash %}
212
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/posterous";
213
+ JekyllImport::Posterous.process("my_email", "my_pass")'
214
+ {% endhighlight %}
215
+
216
+ For any other Posterous blog on your account, you will need to specify the
217
+ `blog_id` for the blog:
218
+
219
+ {% highlight bash %}
220
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/posterous";
221
+ JekyllImport::Posterous.process("my_email", "my_pass", "blog_id")'
222
+ {% endhighlight %}
223
+
224
+ There is also an [alternative Posterous
225
+ migrator](https://github.com/pepijndevos/jekyll/blob/patch-1/lib/jekyll/migrators/posterous.rb)
226
+ that maintains permalinks and attempts to import images too.
227
+
228
+ ## Tumblr
229
+
230
+ To import posts from Tumblr:
231
+
232
+ {% highlight bash %}
233
+ $ ruby -rubygems -e 'require "jekyll/jekyll-import/tumblr";
234
+ JekyllImport::Tumblr.process(url, format, grab_images, add_highlights, rewrite_urls)'
235
+ # url - String: your blog's URL
236
+ # format - String: the output file extension. Use "md" to have your content
237
+ # converted from HTML to Markdown. Defaults to "html".
238
+ # grab_images - Boolean: whether to download images as well. Defaults to false.
239
+ # add_highlights - Boolean: whether to wrap code blocks (indented 4 spaces) in a Liquid
240
+ "highlight" tag. Defaults to false.
241
+ # rewrite_urls - Boolean: whether to write pages that redirect from the old Tumblr paths
242
+ to the new Jekyll paths. Defaults to false.
243
+ {% endhighlight %}
244
+
245
+ ## Other Systems
246
+
247
+ If you have a system for which there is currently no migrator, consider writing
248
+ one and sending us [a pull request](https://github.com/jekyll/jekyll-import).
data/site/docs/pages.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  layout: docs
3
3
  title: Creating pages
4
- prev_section: drafts
4
+ prev_section: posts
5
5
  next_section: variables
6
6
  permalink: /docs/pages/
7
7
  ---
@@ -53,9 +53,9 @@ and associated URLs might look like:
53
53
  |-- _layouts/
54
54
  |-- _posts/
55
55
  |-- _site/
56
- |-- about.html # => http://example.com/about.html
57
- |-- index.html # => http://example.com/
58
- └── contact.html # => http://example.com/contact.html
56
+ |-- about.html # => http://yoursite.com/about.html
57
+ |-- index.html # => http://yoursite.com/
58
+ └── contact.html # => http://yoursite.com/contact.html
59
59
  {% endhighlight %}
60
60
 
61
61
  ### Named folders containing index HTML files
@@ -76,10 +76,10 @@ look like:
76
76
  ├── _posts/
77
77
  ├── _site/
78
78
  ├── about/
79
- | └── index.html # => http://example.com/about/
79
+ | └── index.html # => http://yoursite.com/about/
80
80
  ├── contact/
81
- | └── index.html # => http://example.com/contact/
82
- └── index.html # => http://example.com/
81
+ | └── index.html # => http://yoursite.com/contact/
82
+ └── index.html # => http://yoursite.com/
83
83
  {% endhighlight %}
84
84
 
85
85
  This approach may not suit everyone, but for people who like clean URLs it’s
@@ -182,30 +182,51 @@ page with links to all but the current page.
182
182
 
183
183
  {% highlight html %}
184
184
  {% raw %}
185
- {% if paginator.total_pages > 1 %}
186
- <div class="pagination">
185
+ <div id="post-pagination" class="pagination">
187
186
  {% if paginator.previous_page %}
188
- <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo; Prev</a>
187
+ <p class="previous">
188
+ {% if paginator.previous_page == 1 %}
189
+ <a href="/">Previous</a>
190
+ {% else %}
191
+ <a href="{{ paginator.previous_page_path }}">Previous</a>
192
+ {% endif %}
193
+ </p>
189
194
  {% else %}
190
- <span>&laquo; Prev</span>
195
+ <p class="previous disabled">
196
+ <span>Previous</span>
197
+ </p>
191
198
  {% endif %}
192
199
 
193
- {% for page in (1..paginator.total_pages) %}
194
- {% if page == paginator.page %}
195
- <em>{{ page }}</em>
196
- {% elsif page == 1 %}
197
- <a href="{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
198
- {% else %}
199
- <a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
200
- {% endif %}
201
- {% endfor %}
200
+ <ul class="pages">
201
+ <li class="page">
202
+ {% if paginator.page == 1 %}
203
+ <span class="current-page">1</span>
204
+ {% else %}
205
+ <a href="/">1</a>
206
+ {% endif %}
207
+ </li>
208
+
209
+ {% for count in (2..paginator.total_pages) %}
210
+ <li class="page">
211
+ {% if count == paginator.page %}
212
+ <span class="current-page">{{ count }}</span>
213
+ {% else %}
214
+ <a href="/page{{ count }}">{{ count }}</a>
215
+ {% endif %}
216
+ </li>
217
+ {% endfor %}
218
+ </ul>
202
219
 
203
220
  {% if paginator.next_page %}
204
- <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next &raquo;</a>
221
+ <p class="next">
222
+ <a href="{{ paginator.next_page_path }}">Next</a>
223
+ </p>
205
224
  {% else %}
206
- <span>Next &raquo;</span>
225
+ <p class="next disabled">
226
+ <span>Next</span>
227
+ </p>
207
228
  {% endif %}
229
+
208
230
  </div>
209
- {% endif %}
210
231
  {% endraw %}
211
232
  {% endhighlight %}
data/site/docs/plugins.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  layout: docs
3
3
  title: Plugins
4
- prev_section: pagination
4
+ prev_section: assets
5
5
  next_section: extras
6
6
  permalink: /docs/plugins/
7
7
  ---
@@ -25,27 +25,9 @@ having to modify the Jekyll source itself.
25
25
 
26
26
  ## Installing a plugin
27
27
 
28
- You have 2 options for installing plugins:
29
-
30
- 1. In your site source root, make a `_plugins` directory. Place your plugins here.
31
- Any file ending in `*.rb` inside this directory will be loaded before Jekyll
32
- generates your site.
33
- 2. In your `_config.yml` file, add a new array with the key `gems` and the values
34
- of the gem names of the plugins you'd like to use. An example:
35
-
36
- gems: [jekyll-test-plugin, jekyll-jsonify, jekyll-assets]
37
- # This will require each of these gems automatically.
38
-
39
- <div class="note info">
40
- <h5>
41
- <code>_plugins</code> and <code>gems</code>
42
- can be used simultaneously
43
- </h5>
44
- <p>
45
- You may use both of the aforementioned plugin options simultaneously in the
46
- same site if you so choose. Use of one does not restrict the use of the other
47
- </p>
48
- </div>
28
+ In your site source root, make a `_plugins` directory. Place your plugins here.
29
+ Any file ending in `*.rb` inside this directory will be loaded before Jekyll
30
+ generates your site.
49
31
 
50
32
  In general, plugins you make will fall into one of three categories:
51
33
 
@@ -56,45 +38,7 @@ In general, plugins you make will fall into one of three categories:
56
38
  ## Generators
57
39
 
58
40
  You can create a generator when you need Jekyll to create additional content
59
- based on your own rules.
60
-
61
- A generator is a subclass of `Jekyll::Generator` that defines a `generate`
62
- method, which receives an instance of
63
- [`Jekyll::Site`]({{ site.repository }}/blob/master/lib/jekyll/site.rb).
64
-
65
- Generation is triggered for its side-effects, the return value of `generate` is
66
- ignored. Jekyll does not assume any particular side-effect to happen, it just
67
- runs the method.
68
-
69
- Generators run after Jekyll has made an inventory of the existing content, and
70
- before the site is generated. Pages with YAML front-matters are stored as
71
- instances of
72
- [`Jekyll::Page`]({{ site.repository }}/blob/master/lib/jekyll/page.rb)
73
- and are available via `site.pages`. Static files become instances of
74
- [`Jekyll::StaticFile`]({{ site.repository }}/blob/master/lib/jekyll/static_file.rb)
75
- and are available via `site.static_files`. See
76
- [`Jekyll::Site`]({{ site.repository }}/blob/master/lib/jekyll/site.rb)
77
- for more details.
78
-
79
- For instance, a generator can inject values computed at build time for template
80
- variables. In the following example the template `reading.html` has two
81
- variables `ongoing` and `done` that we fill in the generator:
82
-
83
- {% highlight ruby %}
84
- module Reading
85
- class Generator < Jekyll::Generator
86
- def generate(site)
87
- ongoing, done = Book.all.partition(&:ongoing?)
88
-
89
- reading = site.pages.detect {|page| page.name == 'reading.html'}
90
- reading.data['ongoing'] = ongoing
91
- reading.data['done'] = done
92
- end
93
- end
94
- end
95
- {% endhighlight %}
96
-
97
- This is a more complex generator that generates new pages:
41
+ based on your own rules. For example, a generator might look like this:
98
42
 
99
43
  {% highlight ruby %}
100
44
  module Jekyll
@@ -151,7 +95,7 @@ Generators are only required to implement one method:
151
95
  <p><code>generate</code></p>
152
96
  </td>
153
97
  <td>
154
- <p>Generates content as a side-effect.</p>
98
+ <p>String output of the content being generated.</p>
155
99
  </td>
156
100
  </tr>
157
101
  </tbody>
@@ -412,16 +356,13 @@ You can find a few useful plugins at the following locations:
412
356
 
413
357
  - [ArchiveGenerator by Ilkka Laukkanen](https://gist.github.com/707909): Uses [this archive page](https://gist.github.com/707020) to generate archives.
414
358
  - [LESS.js Generator by Andy Fowler](https://gist.github.com/642739): Renders LESS.js files during generation.
415
- - [Version Reporter by Blake Smith](https://gist.github.com/449491): Creates a version.html file containing the Jekyll version.
359
+ - [Version Reporter by Blake Smith](https://gist.github.com/449491): Creates a version.html file containing the Jekyll version.
416
360
  - [Sitemap.xml Generator by Michael Levin](https://github.com/kinnetica/jekyll-plugins): Generates a sitemap.xml file by traversing all of the available posts and pages.
417
361
  - [Full-text search by Pascal Widdershoven](https://github.com/PascalW/jekyll_indextank): Adds full-text search to your Jekyll site with a plugin and a bit of JavaScript.
418
362
  - [AliasGenerator by Thomas Mango](https://github.com/tsmango/jekyll_alias_generator): Generates redirect pages for posts when an alias is specified in the YAML Front Matter.
419
363
  - [Pageless Redirect Generator by Nick Quinlan](https://github.com/nquinlan/jekyll-pageless-redirects): Generates redirects based on files in the Jekyll root, with support for htaccess style redirects.
420
364
  - [Projectlist by Frederic Hemberger](https://github.com/fhemberger/jekyll-projectlist): Renders files in a directory as a single page instead of separate posts.
421
365
  - [RssGenerator by Assaf Gelber](https://github.com/agelber/jekyll-rss): Automatically creates an RSS 2.0 feed from your posts.
422
- - [Monthly archive generator by Shigeya Suzuki](https://github.com/shigeya/jekyll-monthly-archive-plugin): Generator and template which renders monthly archive like MovableType style, based on the work by Ilkka Laukkanen and others above.
423
- - [Category archive generator by Shigeya Suzuki](https://github.com/shigeya/jekyll-category-archive-plugin): Generator and template which renders category archive like MovableType style, based on Monthly archive generator.
424
- - [Emoji for Jekyll](https://github.com/yihangho/emoji-for-jekyll): Seamlessly enable emoji for all posts and pages.
425
366
 
426
367
  #### Converters
427
368
 
@@ -440,7 +381,6 @@ You can find a few useful plugins at the following locations:
440
381
  - [Jekyll-pandoc-multiple-formats](https://github.com/fauno/jekyll-pandoc-multiple-formats) by [edsl](https://github.com/edsl): Use pandoc to generate your site in multiple formats. Supports pandoc’s markdown extensions.
441
382
  - [ReStructuredText Converter](https://github.com/xdissent/jekyll-rst): Converts ReST documents to HTML with Pygments syntax highlighting.
442
383
  - [Transform Layouts](https://gist.github.com/1472645): Allows HAML layouts (you need a HAML Converter plugin for this to work).
443
- - [Org-mode Converter](https://gist.github.com/abhiyerra/7377603): Org-mode converter for Jekyll.
444
384
 
445
385
  #### Filters
446
386
 
@@ -459,7 +399,6 @@ You can find a few useful plugins at the following locations:
459
399
 
460
400
  #### Tags
461
401
 
462
- - [Asset Path Tag](https://github.com/samrayner/jekyll-asset-path-plugin) by [Sam Rayner](http://www.samrayner.com/): Allows organisation of assets into subdirectories by outputting a path for a given file relative to the current post or page.
463
402
  - [Delicious Plugin by Christian Hellsten](https://github.com/christianhellsten/jekyll-plugins): Fetches and renders bookmarks from delicious.com.
464
403
  - [Ultraviolet Plugin by Steve Alex](https://gist.github.com/480380): Jekyll tag for the [Ultraviolet](http://ultraviolet.rubyforge.org/) code highligher.
465
404
  - [Tag Cloud Plugin by Ilkka Laukkanen](https://gist.github.com/710577): Generate a tag cloud that links to tag pages.
@@ -491,10 +430,6 @@ You can find a few useful plugins at the following locations:
491
430
  - [Jekyll Image Tag](https://github.com/robwierzbowski/jekyll-image-tag): Better images for Jekyll. Save image presets, generate resized images, and add classes, alt text, and other attributes.
492
431
  - [Ditaa Tag](https://github.com/matze/jekyll-ditaa) by [matze](https://github.com/matze): Renders ASCII diagram art into PNG images and inserts a figure tag.
493
432
  - [Good Include](https://github.com/penibelst/jekyll-good-include) by [Anatol Broder](http://penibelst.de/): Strips newlines and whitespaces from the end of include files before processing.
494
- - [Jekyll Suggested Tweet](https://github.com/davidensinger/jekyll-suggested-tweet) by [David Ensinger](https://github.com/davidensinger/): A Liquid tag for Jekyll that allows for the embedding of suggested tweets via Twitter’s Web Intents API.
495
- - [Jekyll Date Chart](https://github.com/GSI/jekyll_date_chart) by [GSI](https://github.com/GSI): Block that renders date line charts based on textile-formatted tables.
496
- - [Jekyll Image Encode](https://github.com/GSI/jekyll_image_encode) by [GSI](https://github.com/GSI): Tag that renders base64 codes of images fetched from the web.
497
- - [Jekyll Quick Man](https://github.com/GSI/jekyll_quick_man) by [GSI](https://github.com/GSI): Tag that renders pretty links to man page sources on the internet.
498
433
 
499
434
  #### Collections
500
435