sixones-jekyll 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/.gitignore +6 -0
  2. data/History.txt +28 -0
  3. data/README.textile +25 -529
  4. data/Rakefile +2 -2
  5. data/VERSION.yml +1 -1
  6. data/bin/jekyll +12 -2
  7. data/features/create_sites.feature +46 -0
  8. data/features/embed_filters.feature +60 -0
  9. data/features/pagination.feature +40 -0
  10. data/features/permalinks.feature +63 -0
  11. data/features/post_data.feature +153 -0
  12. data/features/site_configuration.feature +63 -0
  13. data/features/site_data.feature +82 -0
  14. data/features/step_definitions/jekyll_steps.rb +136 -0
  15. data/features/support/env.rb +16 -0
  16. data/jekyll.gemspec +134 -0
  17. data/lib/jekyll/albino.rb +4 -2
  18. data/lib/jekyll/convertible.rb +6 -4
  19. data/lib/jekyll/core_ext.rb +9 -1
  20. data/lib/jekyll/filters.rb +5 -1
  21. data/lib/jekyll/page.rb +58 -13
  22. data/lib/jekyll/pager.rb +45 -0
  23. data/lib/jekyll/post.rb +76 -30
  24. data/lib/jekyll/site.rb +44 -16
  25. data/lib/jekyll/tags/highlight.rb +2 -2
  26. data/lib/jekyll.rb +8 -6
  27. data/test/helper.rb +3 -0
  28. data/test/source/_posts/2009-03-12-hash-#1.markdown +6 -0
  29. data/test/source/_posts/2009-05-18-tag.textile +6 -0
  30. data/test/source/_posts/2009-05-18-tags.textile +9 -0
  31. data/test/source/_posts/2009-06-22-empty-yaml.textile +3 -0
  32. data/test/source/_posts/2009-06-22-no-yaml.textile +1 -0
  33. data/test/source/about.html +6 -0
  34. data/test/source/contacts.html +5 -0
  35. data/test/source/win/_posts/2009-05-24-yaml-linebreak.markdown +7 -0
  36. data/test/test_configuration.rb +29 -0
  37. data/test/test_filters.rb +8 -0
  38. data/test/test_generated_site.rb +7 -5
  39. data/test/test_page.rb +87 -0
  40. data/test/test_pager.rb +47 -0
  41. data/test/test_post.rb +160 -3
  42. data/test/test_site.rb +29 -1
  43. data/test/test_tags.rb +97 -16
  44. metadata +31 -6
  45. data/lib/jekyll/custom_filters.rb +0 -25
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ test/dest
2
+ *.gem
3
+ pkg/
4
+ *.swp
5
+ *~
6
+ _site/
data/History.txt CHANGED
@@ -1,3 +1,31 @@
1
+ == 0.5.2 / 2009-06-24
2
+ * Enhancements
3
+ * Added --paginate option to the executable along with a paginator object for the payload [github.com/calavera]
4
+ * Upgraded RedCloth to 4.2.1, which makes <notextile> tags work once again.
5
+ * Configuration options set in config.yml are now available through the site payload [github.com/vilcans]
6
+ * Posts can now have an empty YAML front matter or none at all [github.com/bahuvrihi]
7
+ * Bug Fixes
8
+ * Fixing Ruby 1.9 issue that requires to_s on the err object [github.com/Chrononaut]
9
+ * Fixes for pagination and ordering posts on the same day [github.com/ujh]
10
+ * Made pages respect permalinks style and permalinks in yml front matter [github.com/eugenebolshakov]
11
+ * Index.html file should always have index.html permalink [github.com/eugenebolshakov]
12
+ * Added trailing slash to pretty permalink style so Apache is happy [github.com/eugenebolshakov]
13
+ * Bad markdown processor in config fails sooner and with better message [github.com/gcnovus]
14
+ * Allow CRLFs in yaml frontmatter [github.com/juretta]
15
+ * Added Date#xmlschema for Ruby versions < 1.9
16
+
17
+ == 0.5.1 / 2009-05-06
18
+ * Major Enhancements
19
+ * Next/previous posts in site payload [github.com/pantulis, github.com/tomo]
20
+ * Permalink templating system
21
+ * Moved most of the README out to the GitHub wiki
22
+ * Exclude option in configuration so specified files won't be brought over with generated site [github.com/duritong]
23
+ * Bug Fixes
24
+ * Making sure config.yaml references are all gone, using only config.yml
25
+ * Fixed syntax highlighting breaking for UTF-8 code [github.com/henrik]
26
+ * Worked around RDiscount bug that prevents Markdown from getting parsed after highlight [github.com/henrik]
27
+ * CGI escaped post titles [github.com/Chrononaut]
28
+
1
29
  == 0.5.0 / 2009-04-07
2
30
  * Minor Enhancements
3
31
  * Ability to set post categories via YAML [github.com/qrush]
data/README.textile CHANGED
@@ -1,378 +1,35 @@
1
1
  h1. Jekyll
2
2
 
3
- Jekyll is a simple, blog aware, static site generator. It takes a template
4
- directory (representing the raw form of a website), runs it through Textile or
5
- Markdown and Liquid converters, and spits out a complete, static website
6
- suitable for serving with Apache or your favorite web server. Visit
7
- "http://tom.preston-werner.com":http://tom.preston-werner.com to see an
8
- example of a Jekyll generated blog.
3
+ By Tom Preston-Werner, Nick Quaranto, and many awesome contributors!
9
4
 
10
- To understand how this all works, open up my
11
- "TPW":http://github.com/mojombo/tpw repo in a new browser window. I'll be
12
- referencing the code there.
5
+ Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server. This is also the engine behind "GitHub Pages":http://pages.github.com, which you can use to host your project's page or blog right here from GitHub.
13
6
 
14
- Take a look at
15
- "index.html":http://github.com/mojombo/tpw/tree/master/index.html. This file
16
- represents the homepage of the site. At the top of the file is a chunk of YAML
17
- that contains metadata about the file. This data tells Jekyll what layout to
18
- give the file, what the page's title should be, etc. In this case, I specify
19
- that the "default" template should be used. You can find the layout files in
20
- the "_layouts":http://github.com/mojombo/tpw/tree/master/_layouts directory.
21
- If you open
22
- "default.html":http://github.com/mojombo/tpw/tree/master/_layouts/default.html
23
- you can see that the homepage is constructed by wrapping index.html with this
24
- layout.
7
+ h2. Getting Started
25
8
 
26
- You'll also notice Liquid templating code in these files.
27
- "Liquid":http://www.liquidmarkup.org/ is a simple, extensible templating
28
- language that makes it easy to embed data in your templates. For my homepage I
29
- wanted to have a list of all my blog posts. Jekyll hands me a Hash containing
30
- various data about my site. A reverse chronological list of all my blog posts
31
- can be found in <code>site.posts</code>. Each post, in turn, contains various
32
- fields such as <code>title</code> and <code>date</code>.
9
+ * "Install":http://wiki.github.com/mojombo/jekyll/install the gem
10
+ * Read up about its "Usage":http://wiki.github.com/mojombo/jekyll/usage and "Configuration":http://wiki.github.com/mojombo/jekyll/configuration
11
+ * Take a gander at some existing "Sites":http://wiki.github.com/mojombo/jekyll/sites
12
+ * Fork and "Contribute":http://wiki.github.com/mojombo/jekyll/contribute your own modifications
13
+ * Have questions? Post them on the "Mailing List":http://groups.google.com/group/jekyll-rb
33
14
 
34
- Jekyll gets the list of blog posts by parsing the files in any
35
- "_posts":http://github.com/mojombo/tpw/tree/master/_posts directory found in
36
- subdirectories below the root.
37
- Each post's filename contains (by default) the publishing date and slug (what shows up in the
38
- URL) that the final HTML file should have. Open up the file corresponding to a
39
- blog post:
40
- "2008-11-17-blogging-like-a-hacker.textile":http://github.com/mojombo/tpw/tree/master/_posts/2008-11-17-blogging-like-a-hacker.textile.
41
- GitHub renders textile files by default, so to better understand the file,
42
- click on the
43
- "raw":http://github.com/mojombo/tpw/tree/master/_posts/2008-11-17-blogging-like-a-hacker.textile?raw=true
44
- view to see the original file. Here I've specified the <code>post</code>
45
- layout. If you look at that file you'll see an example of a nested layout.
46
- Layouts can contain other layouts allowing you a great deal of flexibility in
47
- how pages are assembled. In my case I use a nested layout in order to show
48
- related posts for each blog entry. The YAML also specifies the post's title
49
- which is then embedded in the post's body via Liquid.
15
+ h2. Diving In
50
16
 
51
- Posts are handled in a special way by Jekyll. The date you specify in the
52
- filename is used to construct the URL in the generated site. The example post,
53
- for instance, ends up at
54
- <code>http://tom.preston-werner.com/2008/11/17/blogging-like-a-hacker.html</code>.
17
+ * "Migrate":http://wiki.github.com/mojombo/jekyll/blog-migrations from your previous system
18
+ * Learn how the "YAML Front Matter":http://wiki.github.com/mojombo/jekyll/yaml-front-matter works
19
+ * Put information on your site with "Template Data":http://wiki.github.com/mojombo/jekyll/template-data
20
+ * Customize the "Permalinks":http://wiki.github.com/mojombo/jekyll/permalinks your posts are generated with
21
+ * Use the built-in "Liquid Extensions":http://wiki.github.com/mojombo/jekyll/liquid-extensions to make your life easier
55
22
 
56
- Categories for posts are derived from the directory structure the posts were
57
- found within. A post that appears in the directory foo/bar/_posts is placed in
58
- the categories 'foo' and 'bar'. By selecting posts from particular categories
59
- in your Liquid templates, you will be able to host multiple blogs within a
60
- site.
23
+ h2. Dependencies
61
24
 
62
- Files that do not reside in directories prefixed with an underscore are
63
- mirrored into a corresponding directory structure in the generated site. If a
64
- file does not have a YAML preface, it is not run through the Liquid
65
- interpreter. Binary files are copied over unmodified.
25
+ * RedCloth: Textile support
26
+ * Liquid: Templating system
27
+ * Classifier: Generating related posts
28
+ * Maruku: Default markdown engine
29
+ * Directory Watcher: Auto-regeneration of sites
30
+ * Open4: Talking to pygments for syntax highlighting
66
31
 
67
- Jekyll is still a very young project. I've only developed the exact
68
- functionality that I've needed. As time goes on I'd like to see the project
69
- mature and support additional features. If you end up using Jekyll for your
70
- own blog, drop me a line and let me know what you'd like to see in future
71
- versions. Better yet, fork the project over at GitHub and hack in the features
72
- yourself!
73
-
74
- h2. Example Proto-Site
75
-
76
- My own personal site/blog is generated with Jekyll.
77
-
78
- The proto-site repo
79
- ("http://github.com/mojombo/tpw":http://github.com/mojombo/tpw) is converted
80
- into the actual site
81
- ("http://tom.preston-werner.com/":http://tom.preston-werner.com)
82
-
83
- h2. Install
84
-
85
- The best way to install Jekyll is via RubyGems:
86
-
87
- $ sudo gem install mojombo-jekyll -s http://gems.github.com/
88
-
89
- Jekyll requires the gems `directory_watcher`, `liquid`, `open4`,
90
- and `maruku` (for markdown support). These are automatically
91
- installed by the gem install command.
92
-
93
- Maruku comes with optional support for LaTeX to PNG rendering via
94
- "blahtex":http://gva.noekeon.org/blahtexml/ (Version 0.6) which must be in
95
- your $PATH along with `dvips`.
96
-
97
- (NOTE: the version of maruku I am using is `remi-maruku` on GitHub as it
98
- does not assume a fixed location for `dvips`.)
99
-
100
- h2. Run
101
-
102
- $ cd /path/to/proto/site
103
- $ jekyll
104
-
105
- This will generate the site and place it in /path/to/proto/site/_site. If
106
- you'd like the generated site placed somewhere else:
107
-
108
- $ jekyll /path/to/place/generated/site
109
-
110
- And if you don't want to be in the proto site root to run Jekyll:
111
-
112
- $ jekyll /path/to/proto/site /path/to/place/generated/site
113
-
114
- h2. Run Options
115
-
116
- h3. Autobuild
117
-
118
- There is an autobuild feature that will regenerate your site if any of the
119
- files change. The autobuild feature can be used on any of the invocations:
120
-
121
- $ jekyll --auto
122
-
123
- h3. Related Posts
124
-
125
- By default, the "related posts" functionality will produce crappy results.
126
- In order to get high quality results with a true LSI algorithm, you must
127
- enable it (it may take some time to run if you have many posts):
128
-
129
- $ jekyll --lsi
130
-
131
- h3. Code Highlighting
132
-
133
- For static code highlighting, you can install Pygments (see below) and then
134
- use that to make your code blocks look pretty. To activate Pygments support
135
- during the conversion:
136
-
137
- $ jekyll --pygments
138
-
139
- h3. Markdown Processor
140
-
141
- By default, Jekyll uses "Maruku":http://maruku.rubyforge.org (pure Ruby) for
142
- Markdown support. If you'd like to use RDiscount (faster, but requires
143
- compilation), you must install it (gem install rdiscount) and then you can
144
- have it used instead:
145
-
146
- $ jekyll --rdiscount
147
-
148
- h3. Local Server
149
-
150
- When previewing complex sites locally, simply opening the site in a web
151
- browser (using file://) can cause problems with links that are relative to
152
- the site root (e.g., "/stylesheets/style.css"). To get around this, Jekyll
153
- can launch a simple WEBrick server (works well in conjunction with --auto).
154
- Default port is 4000:
155
-
156
- $ jekyll --server [PORT]
157
-
158
- h3. Permalink Style
159
-
160
- By default, the permalink for each post begins with its date in 'YYYY/MM/DD'
161
- format.
162
-
163
- If you do not wish to have the date appear in the URL of each post,
164
- you can change the permalink style to 'none' so that only the 'slug' part of
165
- the filename is used. For example, with the permalink style set to 'none' the
166
- file '2009-01-01-happy-new-year.markdown' will have a permalink like
167
- 'http://yoursite.com/happy-new-year.html'. The date of the post will still be
168
- read from the filename (and is required!) to be used elsewhere in Jekyll.
169
-
170
- If you want WordPress-style pretty URLs that leave off the .html, you can
171
- change the permalink style to 'pretty' and directories corresponding to the
172
- date parts and post name will be made and an index.html will be placed in the
173
- leaf directory resulting in URLs like 2008/11/17/blogging-like-a-hacker/.
174
-
175
- $ jekyll --permalink [date|none|pretty]
176
-
177
- h2. Configuration File
178
-
179
- All of the options listed above can be specified on a site-by-site basis in
180
- a '_config.yml' file at the root of the site's source. As the filename
181
- suggests, the configuration is given in "YAML":http://www.yaml.org/. As
182
- well as all of the options discussed in the last section, there are a few
183
- additional options:
184
-
185
- destination: [PATH] # Specify where the site should be rendered
186
- markdown: [maruku|rdiscount] # Which markdown renderer to use?
187
-
188
- maruku: # This is a YAML hash for Maruku settings
189
- use_divs: [BOOLEAN] # Use the div element Maruku extension
190
- use_tex: [BOOLEAN] # Use the LaTeX extension to Maruku
191
- png_dir: [PATH] # Where should the math PNGs be stored?
192
- png_url: [URL] # A relative URL for the PNGs
193
-
194
- The default configuration is shown below as in YAML format:
195
-
196
- destination: ./_site
197
- auto: false
198
- lsi: false
199
- server_port: 4000
200
- pygments: false
201
- markdown: maruku
202
- permalink: date
203
- custom_filters: false
204
-
205
- maruku:
206
- use_tex: false
207
- use_divs: false
208
- png_dir: images/latex
209
- png_url: /images/latex
210
-
211
- Parameters set in a configuration file override the default values. Parameters
212
- set using command line options override both the default values and those set
213
- in a configuration file.
214
-
215
- h2. Data
216
-
217
- Jekyll traverses your site looking for files to process. Any files with YAML
218
- front matter (see below) are subject to processing. For each of these files,
219
- Jekyll makes a variety of data available to the pages via the Liquid
220
- templating system. The following is a reference of the available data.
221
-
222
- h3. Global
223
-
224
- site
225
- Sitewide information.
226
-
227
- page
228
- For Posts, this is the union of the data in the YAML front matter and the
229
- computed data (such as URL and date). For regular pages, this is just the
230
- YAML front matter.
231
-
232
- content
233
- In layout files, this contains the content of the subview(s). In Posts or
234
- Pages, this is undefined.
235
-
236
- h3. Site
237
-
238
- site.time
239
- The current Time (when you run the jekyll command).
240
-
241
- site.posts
242
- A reverse chronological list of all Posts.
243
-
244
- site.related_posts
245
- If the page being processed is a Post, this contains a list of up to ten
246
- related Posts. By default, these are low quality but fast to compute. For
247
- high quality but slow to compute results, run the jekyll command with the
248
- --lsi (latent semantic indexing) option.
249
-
250
- site.categories.CATEGORY
251
- The list of all Posts in category CATEGORY.
252
-
253
- h3. Post
254
-
255
- post.title
256
- The title of the Post.
257
-
258
- post.url
259
- The URL of the Post without the domain.
260
- e.g. /2008/12/14/my-post.html
261
-
262
- post.date
263
- The Date assigned to the Post.
264
-
265
- post.id
266
- An identifier unique to the Post (useful in RSS feeds).
267
- e.g. /2008/12/14/my-post
268
-
269
- post.categories
270
- The list of categories to which this post belongs. Categories are
271
- derived from the directory structure above the _posts directory. For
272
- example, a post at /work/code/_posts/2008-12-24-closures.textile
273
- would have this field set to ['work', 'code'].
274
-
275
- post.topics
276
- The list of topics for this Post. Topics are derived from the directory
277
- structure beneath the _posts directory. For example, a post at
278
- /_posts/music/metal/2008-12-24-metalocalypse.textile would have this field
279
- set to ['music', 'metal'].
280
-
281
- post.content
282
- The content of the Post.
283
-
284
- h2. YAML Front Matter
285
-
286
- Any files that contain a YAML front matter block will be processed by Jekyll
287
- as special files. The front matter must be the first thing in the file and
288
- takes the form of:
289
-
290
- <pre>
291
- ---
292
- layout: post
293
- title: Blogging Like a Hacker
294
- ---
295
- </pre>
296
-
297
- Between the triple-dashed lines, you can set predefined variables (see below
298
- for a reference) or custom data of your own.
299
-
300
- h3. Predefined Global Variables
301
-
302
- layout
303
- If set, this specifies the layout file to use. Use the layout file
304
- name without file extension. Layout files must be placed in the
305
- <code>_layouts</code> directory.
306
-
307
- h3. Predefined Post Variables
308
-
309
- permalink
310
- If you need your processed URLs to be something other than the default
311
- /year/month/day/title.html then you can set this variable and it will
312
- be used as the final URL.
313
-
314
- published
315
- Set to false if you don't want a post to show up when the site is
316
- generated.
317
-
318
- category/categories
319
- Instead of placing posts inside of folders, you can specify one or more
320
- categories that the post belongs to. When the site is generated the post
321
- will act as though it had been set with these categories normally.
322
-
323
- h3. Custom Variables
324
-
325
- Any variables in the front matter that are not predefined are mixed into the
326
- data that is sent to the Liquid templating engine during the conversion. For
327
- instance, if you set a <code>title</code>, you can use that in your layout to
328
- set the page title:
329
-
330
- <pre>
331
- <title>{{ page.title }}</title>
332
- </pre>
333
-
334
- h2. Filters, Tags, and Blocks
335
-
336
- In addition to the built-in Liquid filters, tags, and blocks, Jekyll provides
337
- some additional items that you can use in your site.
338
-
339
- h3. Date to XML Schema (Filter)
340
-
341
- Convert a Time into XML Schema format.
342
-
343
- {{ site.time | date_to_xmlschema }}
344
-
345
- becomes
346
-
347
- 2008-11-17T13:07:54-08:00
348
-
349
- h3. XML Escape (Filter)
350
-
351
- Escape some text for use in XML.
352
-
353
- {{ post.content | xml_escape }}
354
-
355
- h3. Number of Words (Filter)
356
-
357
- Count the number of words in some text.
358
-
359
- {{ post.content | number_of_words }}
360
-
361
- becomes
362
-
363
- 1337
364
-
365
- h3. Array to Sentence String
366
-
367
- Convert an array into a sentence.
368
-
369
- {{ page.tags | array_to_sentence_string }}
370
-
371
- becomes
372
-
373
- foo, bar, and baz
374
-
375
- h3. Custom Filters
32
+ h2. Custom Filters
376
33
 
377
34
  Jekyll can use custom liquid filters for the rendering of your site, these
378
35
  can be created in the same way as standard liquid filters. Before a filter
@@ -404,154 +61,6 @@ Custom filters can be enable by running Jekyll with the flag:
404
61
  $ jekyll --custom-filters
405
62
 
406
63
  You can also use the <code>custom_filters</code> property in the YML config.
407
-
408
- h3. Textilize
409
-
410
- Convert a Textile-formatted string into HTML, formatted via RedCloth
411
-
412
- {{ page.excerpt | textilize }}
413
-
414
- h3. Include (Tag)
415
-
416
- If you have small page fragments that you wish to include in multiple places
417
- on your site, you can use the <code>include</code> tag.
418
-
419
- <pre>{% include sig.textile %}</pre>
420
-
421
- Jekyll expects all include files to be placed in an <code>_includes</code>
422
- directory at the root of your source dir. So this will embed the contents of
423
- <code>/path/to/proto/site/_includes/sig.textile</code> into the calling file.
424
-
425
- h3. Code Highlighting (Block)
426
-
427
- Jekyll has built in support for syntax highlighting of over "100
428
- languages":http://pygments.org/languages/ via "Pygments":http://pygments.org/.
429
- In order to take advantage of this you'll need to have Pygments installed, and
430
- the pygmentize binary must be in your path. When you run Jekyll, make sure you
431
- run it with Pygments support:
432
-
433
- $ jekyll --pygments
434
-
435
- To denote a code block that should be highlighted:
436
-
437
- <pre>
438
- {% highlight ruby %}
439
- def foo
440
- puts 'foo'
441
- end
442
- {% endhighlight %}
443
- </pre>
444
-
445
- The argument to <code>highlight</code> is the language identifier. To find the
446
- appropriate identifier to use for your favorite language, look for the "short
447
- name" on the "Lexers":http://pygments.org/docs/lexers/ page.
448
-
449
- There is a second argument to <code>highlight</code> called
450
- <code>linenos</code> that is optional. Including the <code>linenos</code>
451
- argument will force the highlighted code to include line numbers. For
452
- instance, the following code block would include line numbers next to each
453
- line:
454
-
455
- <pre>
456
- {% highlight ruby linenos %}
457
- def foo
458
- puts 'foo'
459
- end
460
- {% endhighlight %}
461
- </pre>
462
-
463
- In order for the highlighting to show up, you'll need to include a
464
- highlighting stylesheet. For an example stylesheet you can look at
465
- "syntax.css":http://github.com/mojombo/tpw/tree/master/css/syntax.css. These
466
- are the same styles as used by GitHub and you are free to use them for your
467
- own site. If you use linenos, you might want to include an additional CSS
468
- class definition for <code>lineno</code> in syntax.css to distinguish the line
469
- numbers from the highlighted code.
470
-
471
- h2. Categories
472
-
473
- Posts are placed into categories based on the directory structure they are
474
- found within (see above for an example). The categories can be accessed from
475
- within a Liquid template as follows:
476
-
477
- <pre>
478
- {% for post in site.categories.foo %}
479
- <li><span>{{ post.date | date_to_string }}</span> - {{ post.title }}</li>
480
- {% endfor %}
481
- </pre>
482
-
483
- This would list all the posts in the category 'foo' by date and title.
484
-
485
- The posts within each category are sorted in reverse chronological order.
486
-
487
- h2. Blog migrations
488
-
489
- h3. Movable Type
490
-
491
- To migrate your MT blog into Jekyll, you'll need read access to the database.
492
- The lib/jekyll/converters/mt.rb module provides a simple convert to create
493
- .markdown files in a _posts directory based on the entries contained therein.
494
-
495
- $ export DB=my_mtdb
496
- $ export USER=dbuser
497
- $ export PASS=dbpass
498
- $ ruby -r './lib/jekyll/converters/mt' -e 'Jekyll::MT.process( \
499
- "#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")'
500
-
501
- You may need to adjust the SQL query used to retrieve MT entries. Left alone,
502
- it will attempt to pull all entries across all blogs regardless of status.
503
- Please check the results and verify the posts before publishing.
504
-
505
- h3. Typo 4+
506
-
507
- To migrate your Typo blog into Jekyll, you'll need read access to the MySQL
508
- database. The lib/jekyll/converters/typo.rb module provides a simple convert
509
- to create .html, .textile, or .markdown files in a _posts directory based on
510
- the entries contained therein.
511
-
512
- $ export DB=my_typo_db
513
- $ export USER=dbuser
514
- $ export PASS=dbpass
515
- $ ruby -r './lib/jekyll/converters/typo' -e 'Jekyll::Typo.process( \
516
- "#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")'
517
-
518
- You may need to adjust the code used to filter Typo entries. Left alone,
519
- it will attempt to pull all entries across all blogs that were published.
520
- This code also has only been tested with Typo version 4+. Previous versions
521
- of Typo may not convert correctly. Please check the results and verify the
522
- posts before publishing.
523
-
524
- h3. TextPattern 4
525
-
526
- To migrate your TextPattern blog into Jekyll, you'll need read access to the MySQL
527
- database. The lib/jekyll/converters/textpattern.rb module provides a simple convert to create .textile files in a _posts directory based on
528
- the entries contained therein.
529
-
530
- $ ruby -r './lib/jekyll/converters/textpattern' -e 'Jekyll::TextPattern.process( \
531
- "database_name", "username", "password", "hostname")'
532
-
533
- The hostname defaults to _localhost_, all other variables are needed
534
- You may need to adjust the code used to filter entries. Left alone,
535
- it will attempt to pull all entries that are live or sticky.
536
-
537
- h2. Contribute
538
-
539
- If you'd like to hack on Jekyll, start by forking my repo on GitHub:
540
-
541
- http://github.com/mojombo/jekyll
542
-
543
- To get all of the dependencies, install the gem first. The best way to get
544
- your changes merged back into core is as follows:
545
-
546
- # Clone down your fork
547
- # Create a topic branch to contain your change
548
- # Hack away
549
- # Add tests and make sure everything still passes by running `rake`
550
- # If you are adding new functionality, document it in README.textile
551
- # Do not change the version number, I will do that on my end
552
- # If necessary, rebase your commits into logical chunks, without errors
553
- # Push the branch up to GitHub
554
- # Send me (mojombo) a pull request for your branch
555
64
 
556
65
  h2. License
557
66
 
@@ -559,21 +68,8 @@ h2. License
559
68
 
560
69
  Copyright (c) 2008 Tom Preston-Werner
561
70
 
562
- Permission is hereby granted, free of charge, to any person obtaining
563
- a copy of this software and associated documentation files (the
564
- 'Software'), to deal in the Software without restriction, including
565
- without limitation the rights to use, copy, modify, merge, publish,
566
- distribute, sublicense, and/or sell copies of the Software, and to
567
- permit persons to whom the Software is furnished to do so, subject to
568
- the following conditions:
71
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
569
72
 
570
- The above copyright notice and this permission notice shall be
571
- included in all copies or substantial portions of the Software.
73
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
572
74
 
573
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
574
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
575
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
576
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
577
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
578
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
579
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
75
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ begin
15
15
  s.rubyforge_project = "jekyll"
16
16
  s.files.exclude 'test/dest'
17
17
  s.test_files.exclude 'test/dest'
18
- s.add_dependency('RedCloth', '>= 4.0.4')
18
+ s.add_dependency('RedCloth', '>= 4.2.1')
19
19
  s.add_dependency('liquid', '>= 1.9.0')
20
20
  s.add_dependency('classifier', '>= 1.3.1')
21
21
  s.add_dependency('maruku', '>= 0.5.9')
@@ -81,7 +81,7 @@ begin
81
81
  require 'cucumber/rake/task'
82
82
 
83
83
  Cucumber::Rake::Task.new(:features) do |t|
84
- t.cucumber_opts = "--format pretty"
84
+ t.cucumber_opts = "--format progress"
85
85
  end
86
86
  rescue LoadError
87
87
  desc 'Cucumber rake task not available'
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 5
4
- :patch: 0
4
+ :patch: 2
data/bin/jekyll CHANGED
@@ -10,7 +10,7 @@ Basic Command Line Usage:
10
10
  jekyll <path to write generated site> # . -> <path>
11
11
  jekyll <path to source> <path to write generated site> # <path> -> <path>
12
12
 
13
- Configuration is read from '<source>/_config.yaml' but can be overriden
13
+ Configuration is read from '<source>/_config.yml' but can be overriden
14
14
  using the following options:
15
15
 
16
16
  HELP
@@ -55,6 +55,16 @@ opts = OptionParser.new do |opts|
55
55
  opts.on("--permalink [TYPE]", "Use 'date' (default) for YYYY/MM/DD") do |style|
56
56
  options['permalink'] = style unless style.nil?
57
57
  end
58
+
59
+ opts.on("--paginate [POSTS_PER_PAGE]", "Paginate a blog's posts") do |per_page|
60
+ begin
61
+ options['paginate'] = per_page.to_i
62
+ raise ArgumentError if options['paginate'] == 0
63
+ rescue
64
+ puts 'you must specify a number of posts by page bigger than 0'
65
+ exit 0
66
+ end
67
+ end
58
68
 
59
69
  opts.on("--version", "Display current version") do
60
70
  puts "Jekyll " + Jekyll.version
@@ -141,4 +151,4 @@ if options['server']
141
151
 
142
152
  trap("INT") { s.shutdown }
143
153
  t.join()
144
- end
154
+ end