elq-jekyll 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. data/History.txt +105 -0
  2. data/README.textile +490 -0
  3. data/VERSION.yml +4 -0
  4. data/bin/jekyll +137 -0
  5. data/lib/jekyll.rb +67 -0
  6. data/lib/jekyll/albino.rb +119 -0
  7. data/lib/jekyll/converters/csv.rb +26 -0
  8. data/lib/jekyll/converters/mephisto.rb +79 -0
  9. data/lib/jekyll/converters/mt.rb +59 -0
  10. data/lib/jekyll/converters/textpattern.rb +50 -0
  11. data/lib/jekyll/converters/typo.rb +49 -0
  12. data/lib/jekyll/converters/wordpress.rb +56 -0
  13. data/lib/jekyll/convertible.rb +71 -0
  14. data/lib/jekyll/core_ext.rb +22 -0
  15. data/lib/jekyll/filters.rb +43 -0
  16. data/lib/jekyll/layout.rb +33 -0
  17. data/lib/jekyll/page.rb +64 -0
  18. data/lib/jekyll/post.rb +188 -0
  19. data/lib/jekyll/site.rb +170 -0
  20. data/lib/jekyll/tags/highlight.rb +56 -0
  21. data/lib/jekyll/tags/include.rb +31 -0
  22. data/test/helper.rb +14 -0
  23. data/test/source/_includes/sig.markdown +3 -0
  24. data/test/source/_layouts/default.html +27 -0
  25. data/test/source/_layouts/simple.html +1 -0
  26. data/test/source/_posts/2008-10-18-foo-bar.textile +8 -0
  27. data/test/source/_posts/2008-11-21-complex.textile +8 -0
  28. data/test/source/_posts/2008-12-03-permalinked-post.textile +9 -0
  29. data/test/source/_posts/2008-12-13-include.markdown +8 -0
  30. data/test/source/category/_posts/2008-9-23-categories.textile +6 -0
  31. data/test/source/css/screen.css +76 -0
  32. data/test/source/foo/_posts/bar/2008-12-12-topical-post.textile +8 -0
  33. data/test/source/index.html +22 -0
  34. data/test/source/z_category/_posts/2008-9-23-categories.textile +6 -0
  35. data/test/suite.rb +9 -0
  36. data/test/test_filters.rb +41 -0
  37. data/test/test_generated_site.rb +32 -0
  38. data/test/test_jekyll.rb +0 -0
  39. data/test/test_post.rb +135 -0
  40. data/test/test_site.rb +36 -0
  41. data/test/test_tags.rb +31 -0
  42. metadata +211 -0
data/History.txt ADDED
@@ -0,0 +1,105 @@
1
+ ==
2
+ * Minor Enhancements
3
+ * Ability to set post categories via YAML [github.com/qrush]
4
+ * Ability to set prevent a post from publishing via YAML [github.com/qrush]
5
+ * Add textilize filter [github.com/willcodeforfoo]
6
+ * Bug Fixes
7
+ * Use block syntax of popen4 to ensure that subprocesses are properly disposed [github.com/jqr]
8
+
9
+ == 0.4.1
10
+ * Minor Enhancements
11
+ * Changed date format on wordpress converter (zeropadding) [github.com/dysinger]
12
+ * Bug Fixes
13
+ * Add jekyll binary as executable to gemspec [github.com/dysinger]
14
+
15
+ == 0.4.0 / 2009-02-03
16
+ * Major Enhancements
17
+ * Switch to Jeweler for packaging tasks
18
+ * Minor Enhancements
19
+ * Type importer [github.com/codeslinger]
20
+ * site.topics accessor [github.com/baz]
21
+ * Add array_to_sentence_string filter [github.com/mchung]
22
+ * Add a converter for textpattern [github.com/PerfectlyNormal]
23
+ * Add a working Mephisto / MySQL converter [github.com/ivey]
24
+ * Allowing .htaccess files to be copied over into the generated site [github.com/briandoll]
25
+ * Add option to not put file date in permalink URL [github.com/mreid]
26
+ * Add line number capabilities to highlight blocks [github.com/jcon]
27
+ * Bug Fixes
28
+ * Fix permalink behavior [github.com/cavalle]
29
+ * Fixed an issue with pygments, markdown, and newlines [github.com/zpinter]
30
+ * Ampersands need to be escaped [github.com/pufuwozu, github.com/ap]
31
+ * Test and fix the site.categories hash [github.com/zzot]
32
+ * Fix site payload available to files [github.com/matrix9180]
33
+
34
+ == 0.3.0 / 2008-12-24
35
+ * Major Enhancements
36
+ * Added --server option to start a simple WEBrick server on destination directory [github.com/johnreilly and github.com/mchung]
37
+ * Minor Enhancements
38
+ * Added post categories based on directories containing _posts [github.com/mreid]
39
+ * Added post topics based on directories underneath _posts
40
+ * Added new date filter that shows the full month name [github.com/mreid]
41
+ * Merge Post's YAML front matter into its to_liquid payload [github.com/remi]
42
+ * Restrict includes to regular files underneath _includes
43
+ * Bug Fixes
44
+ * Change YAML delimiter matcher so as to not chew up 2nd level markdown headers [github.com/mreid]
45
+ * Fix bug that meant page data (such as the date) was not available in templates [github.com/mreid]
46
+ * Properly reject directories in _layouts
47
+
48
+ == 0.2.1 / 2008-12-15
49
+ * Major Changes
50
+ * Use Maruku (pure Ruby) for Markdown by default [github.com/mreid]
51
+ * Allow use of RDiscount with --rdiscount flag
52
+ * Minor Enhancements
53
+ * Don't load directory_watcher unless it's needed [github.com/pjhyett]
54
+
55
+ == 0.2.0 / 2008-12-14
56
+ * Major Changes
57
+ * related_posts is now found in site.related_posts
58
+
59
+ == 0.1.6 / 2008-12-13
60
+ * Major Features
61
+ * Include files in _includes with {% include x.textile %}
62
+
63
+ == 0.1.5 / 2008-12-12
64
+ * Major Features
65
+ * Code highlighting with Pygments if --pygments is specified
66
+ * Disable true LSI by default, enable with --lsi
67
+ * Minor Enhancements
68
+ * Output informative message if RDiscount is not available [github.com/JackDanger]
69
+ * Bug Fixes
70
+ * Prevent Jekyll from picking up the output directory as a source [github.com/JackDanger]
71
+ * Skip related_posts when there is only one post [github.com/JackDanger]
72
+
73
+ == 0.1.4 / 2008-12-08
74
+ * Bug Fixes
75
+ * DATA does not work properly with rubygems
76
+
77
+ == 0.1.3 / 2008-12-06
78
+ * Major Features
79
+ * Markdown support [github.com/vanpelt]
80
+ * Mephisto and CSV converters [github.com/vanpelt]
81
+ * Code hilighting [github.com/vanpelt]
82
+ * Autobuild
83
+ * Bug Fixes
84
+ * Accept both \r\n and \n in YAML header [github.com/vanpelt]
85
+
86
+ == 0.1.2 / 2008-11-22
87
+ * Major Features
88
+ * Add a real "related posts" implementation using Classifier
89
+ * Command Line Changes
90
+ * Allow cli to be called with 0, 1, or 2 args intuiting dir paths
91
+ if they are omitted
92
+
93
+ == 0.1.1 / 2008-11-22
94
+ * Minor Additions
95
+ * Posts now support introspectional data e.g. {{ page.url }}
96
+
97
+ == 0.1.0 / 2008-11-05
98
+ * First release
99
+ * Converts posts written in Textile
100
+ * Converts regular site pages
101
+ * Simple copy of binary files
102
+
103
+ == 0.0.0 / 2008-10-19
104
+ * Birthday!
105
+
data/README.textile ADDED
@@ -0,0 +1,490 @@
1
+ h1. Jekyll
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.
9
+
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.
13
+
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.
25
+
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>.
33
+
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.
50
+
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>.
55
+
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.
61
+
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.
66
+
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
+ There is an autobuild feature that will regenerate your site if any of the
117
+ files change. The autobuild feature can be used on any of the invocations:
118
+
119
+ $ jekyll --auto
120
+
121
+ By default, the "related posts" functionality will produce crappy results.
122
+ In order to get high quality results with a true LSI algorithm, you must
123
+ enable it (it may take some time to run if you have many posts):
124
+
125
+ $ jekyll --lsi
126
+
127
+ For static code highlighting, you can install Pygments (see below) and then
128
+ use that to make your code blocks look pretty. To activate Pygments support
129
+ during the conversion:
130
+
131
+ $ jekyll --pygments
132
+
133
+ By default, Jekyll uses "Maruku":http://maruku.rubyforge.org (pure Ruby) for
134
+ Markdown support. If you'd like to use RDiscount (faster, but requires
135
+ compilation), you must install it (gem install rdiscount) and then you can
136
+ have it used instead:
137
+
138
+ $ jekyll --rdiscount
139
+
140
+ When previewing complex sites locally, simply opening the site in a web
141
+ browser (using file://) can cause problems with links that are relative to
142
+ the site root (e.g., "/stylesheets/style.css"). To get around this, Jekyll
143
+ can launch a simple WEBrick server (works well in conjunction with --auto).
144
+ Default port is 4000:
145
+
146
+ $ jekyll --server [PORT]
147
+
148
+ By default, the permalink for each post begins with its date in 'YYYY/MM/DD'
149
+ format. If you do not wish to have the date appear in the URL of each post,
150
+ you can change the permalink style to 'none' so that only the 'slug' part of
151
+ the filename is used. For example, with the permalink style set to 'none' the
152
+ file '2009-01-01-happy-new-year.markdown' will have a permalink like
153
+ 'http://yoursite.com/happy-new-year.html'. The date of the post will still be
154
+ read from the filename (and is required!) to be used elsewhere in Jekyll.
155
+ Example usage:
156
+
157
+ $ jekyll --permalink none
158
+
159
+ h2. Data
160
+
161
+ Jekyll traverses your site looking for files to process. Any files with YAML
162
+ front matter (see below) are subject to processing. For each of these files,
163
+ Jekyll makes a variety of data available to the pages via the Liquid
164
+ templating system. The following is a reference of the available data.
165
+
166
+ h3. Global
167
+
168
+ site
169
+ Sitewide information.
170
+
171
+ page
172
+ For Posts, this is the union of the data in the YAML front matter and the
173
+ computed data (such as URL and date). For regular pages, this is just the
174
+ YAML front matter.
175
+
176
+ content
177
+ In layout files, this contains the content of the subview(s). In Posts or
178
+ Pages, this is undefined.
179
+
180
+ h3. Site
181
+
182
+ site.time
183
+ The current Time (when you run the jekyll command).
184
+
185
+ site.posts
186
+ A reverse chronological list of all Posts.
187
+
188
+ site.related_posts
189
+ If the page being processed is a Post, this contains a list of up to ten
190
+ related Posts. By default, these are low quality but fast to compute. For
191
+ high quality but slow to compute results, run the jekyll command with the
192
+ --lsi (latent semantic indexing) option.
193
+
194
+ site.categories.CATEGORY
195
+ The list of all Posts in category CATEGORY.
196
+
197
+ h3. Post
198
+
199
+ post.title
200
+ The title of the Post.
201
+
202
+ post.url
203
+ The URL of the Post without the domain.
204
+ e.g. /2008/12/14/my-post.html
205
+
206
+ post.date
207
+ The Date assigned to the Post.
208
+
209
+ post.id
210
+ An identifier unique to the Post (useful in RSS feeds).
211
+ e.g. /2008/12/14/my-post
212
+
213
+ post.categories
214
+ The list of categories to which this post belongs. Categories are
215
+ derived from the directory structure above the _posts directory. For
216
+ example, a post at /work/code/_posts/2008-12-24-closures.textile
217
+ would have this field set to ['work', 'code'].
218
+
219
+ post.topics
220
+ The list of topics for this Post. Topics are derived from the directory
221
+ structure beneath the _posts directory. For example, a post at
222
+ /_posts/music/metal/2008-12-24-metalocalypse.textile would have this field
223
+ set to ['music', 'metal'].
224
+
225
+ post.content
226
+ The content of the Post.
227
+
228
+ h2. YAML Front Matter
229
+
230
+ Any files that contain a YAML front matter block will be processed by Jekyll
231
+ as special files. The front matter must be the first thing in the file and
232
+ takes the form of:
233
+
234
+ <pre>
235
+ ---
236
+ layout: post
237
+ title: Blogging Like a Hacker
238
+ ---
239
+ </pre>
240
+
241
+ Between the triple-dashed lines, you can set predefined variables (see below
242
+ for a reference) or custom data of your own.
243
+
244
+ h3. Predefined Global Variables
245
+
246
+ layout
247
+ If set, this specifies the layout file to use. Use the layout file
248
+ name without file extension. Layout files must be placed in the
249
+ <code>_layouts</code> directory.
250
+
251
+ h3. Predefined Post Variables
252
+
253
+ permalink
254
+ If you need your processed URLs to be something other than the default
255
+ /year/month/day/title.html then you can set this variable and it will
256
+ be used as the final URL.
257
+
258
+ published
259
+ Set to false if you don't want a post to show up when the site is
260
+ generated.
261
+
262
+ category/categories
263
+ Instead of placing posts inside of folders, you can specify one or more
264
+ categories that the post belongs to. When the site is generated the post
265
+ will act as though it had been set with these categories normally.
266
+
267
+ h3. Custom Variables
268
+
269
+ Any variables in the front matter that are not predefined are mixed into the
270
+ data that is sent to the Liquid templating engine during the conversion. For
271
+ instance, if you set a <code>title</code>, you can use that in your layout to
272
+ set the page title:
273
+
274
+ <pre>
275
+ <title>{{ page.title }}</title>
276
+ </pre>
277
+
278
+ h2. Filters, Tags, and Blocks
279
+
280
+ In addition to the built-in Liquid filters, tags, and blocks, Jekyll provides
281
+ some additional items that you can use in your site.
282
+
283
+ h3. Date to XML Schema (Filter)
284
+
285
+ Convert a Time into XML Schema format.
286
+
287
+ {{ site.time | date_to_xmlschema }}
288
+
289
+ becomes
290
+
291
+ 2008-11-17T13:07:54-08:00
292
+
293
+ h3. XML Escape (Filter)
294
+
295
+ Escape some text for use in XML.
296
+
297
+ {{ post.content | xml_escape }}
298
+
299
+ h3. Number of Words (Filter)
300
+
301
+ Count the number of words in some text.
302
+
303
+ {{ post.content | number_of_words }}
304
+
305
+ becomes
306
+
307
+ 1337
308
+
309
+ h3. Array to Sentence String
310
+
311
+ Convert an array into a sentence.
312
+
313
+ {{ page.tags | array_to_sentence_string }}
314
+
315
+ becomes
316
+
317
+ foo, bar, and baz
318
+
319
+ h3. Textilize
320
+
321
+ Convert a Textile-formatted string into HTML, formatted via RedCloth
322
+
323
+ {{ page.excerpt | textilize }}
324
+
325
+ h3. Include (Tag)
326
+
327
+ If you have small page fragments that you wish to include in multiple places
328
+ on your site, you can use the <code>include</code> tag.
329
+
330
+ <pre>{% include sig.textile %}</pre>
331
+
332
+ Jekyll expects all include files to be placed in an <code>_includes</code>
333
+ directory at the root of your source dir. So this will embed the contents of
334
+ <code>/path/to/proto/site/_includes/sig.textile</code> into the calling file.
335
+
336
+ h3. Code Highlighting (Block)
337
+
338
+ Jekyll has built in support for syntax highlighting of over "100
339
+ languages":http://pygments.org/languages/ via "Pygments":http://pygments.org/.
340
+ In order to take advantage of this you'll need to have Pygments installed, and
341
+ the pygmentize binary must be in your path. When you run Jekyll, make sure you
342
+ run it with Pygments support:
343
+
344
+ $ jekyll --pygments
345
+
346
+ To denote a code block that should be highlighted:
347
+
348
+ <pre>
349
+ {% highlight ruby %}
350
+ def foo
351
+ puts 'foo'
352
+ end
353
+ {% endhighlight %}
354
+ </pre>
355
+
356
+ The argument to <code>highlight</code> is the language identifier. To find the
357
+ appropriate identifier to use for your favorite language, look for the "short
358
+ name" on the "Lexers":http://pygments.org/docs/lexers/ page.
359
+
360
+ There is a second argument to <code>highlight</code> called
361
+ <code>linenos</code> that is optional. Including the <code>linenos</code>
362
+ argument will force the highlighted code to include line numbers. For
363
+ instance, the following code block would include line numbers next to each
364
+ line:
365
+
366
+ <pre>
367
+ {% highlight ruby linenos %}
368
+ def foo
369
+ puts 'foo'
370
+ end
371
+ {% endhighlight %}
372
+ </pre>
373
+
374
+ In order for the highlighting to show up, you'll need to include a
375
+ highlighting stylesheet. For an example stylesheet you can look at
376
+ "syntax.css":http://github.com/mojombo/tpw/tree/master/css/syntax.css. These
377
+ are the same styles as used by GitHub and you are free to use them for your
378
+ own site. If you use linenos, you might want to include an additional CSS
379
+ class definition for <code>lineno</code> in syntax.css to distinguish the line
380
+ numbers from the highlighted code.
381
+
382
+ h2. Categories
383
+
384
+ Posts are placed into categories based on the directory structure they are
385
+ found within (see above for an example). The categories can be accessed from
386
+ within a Liquid template as follows:
387
+
388
+ <pre>
389
+ {% for post in site.categories.foo %}
390
+ <li><span>{{ post.date | date_to_string }}</span> - {{ post.title }}</li>
391
+ {% endfor %}
392
+ </pre>
393
+
394
+ This would list all the posts in the category 'foo' by date and title.
395
+
396
+ The posts within each category are sorted in reverse chronological order.
397
+
398
+ h2. Blog migrations
399
+
400
+ h3. Movable Type
401
+
402
+ To migrate your MT blog into Jekyll, you'll need read access to the database.
403
+ The lib/jekyll/converters/mt.rb module provides a simple convert to create
404
+ .markdown files in a _posts directory based on the entries contained therein.
405
+
406
+ $ export DB=my_mtdb
407
+ $ export USER=dbuser
408
+ $ export PASS=dbpass
409
+ $ ruby -r './lib/jekyll/converters/mt' -e 'Jekyll::MT.process( \
410
+ "#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")'
411
+
412
+ You may need to adjust the SQL query used to retrieve MT entries. Left alone,
413
+ it will attempt to pull all entries across all blogs regardless of status.
414
+ Please check the results and verify the posts before publishing.
415
+
416
+ h3. Typo 4+
417
+
418
+ To migrate your Typo blog into Jekyll, you'll need read access to the MySQL
419
+ database. The lib/jekyll/converters/typo.rb module provides a simple convert
420
+ to create .html, .textile, or .markdown files in a _posts directory based on
421
+ the entries contained therein.
422
+
423
+ $ export DB=my_typo_db
424
+ $ export USER=dbuser
425
+ $ export PASS=dbpass
426
+ $ ruby -r './lib/jekyll/converters/typo' -e 'Jekyll::Typo.process( \
427
+ "#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")'
428
+
429
+ You may need to adjust the code used to filter Typo entries. Left alone,
430
+ it will attempt to pull all entries across all blogs that were published.
431
+ This code also has only been tested with Typo version 4+. Previous versions
432
+ of Typo may not convert correctly. Please check the results and verify the
433
+ posts before publishing.
434
+
435
+ h3. TextPattern 4
436
+
437
+ To migrate your TextPattern blog into Jekyll, you'll need read access to the MySQL
438
+ database. The lib/jekyll/converters/textpattern.rb module provides a simple convert to create .textile files in a _posts directory based on
439
+ the entries contained therein.
440
+
441
+ $ ruby -r './lib/jekyll/converters/textpattern' -e 'Jekyll::TextPattern.process( \
442
+ "database_name", "username", "password", "hostname")'
443
+
444
+ The hostname defaults to _localhost_, all other variables are needed
445
+ You may need to adjust the code used to filter entries. Left alone,
446
+ it will attempt to pull all entries that are live or sticky.
447
+
448
+ h2. Contribute
449
+
450
+ If you'd like to hack on Jekyll, start by forking my repo on GitHub:
451
+
452
+ http://github.com/mojombo/jekyll
453
+
454
+ To get all of the dependencies, install the gem first. The best way to get
455
+ your changes merged back into core is as follows:
456
+
457
+ # Clone down your fork
458
+ # Create a topic branch to contain your change
459
+ # Hack away
460
+ # Add tests and make sure everything still passes by running `rake`
461
+ # If you are adding new functionality, document it in README.textile
462
+ # Do not change the version number, I will do that on my end
463
+ # If necessary, rebase your commits into logical chunks, without errors
464
+ # Push the branch up to GitHub
465
+ # Send me (mojombo) a pull request for your branch
466
+
467
+ h2. License
468
+
469
+ (The MIT License)
470
+
471
+ Copyright (c) 2008 Tom Preston-Werner
472
+
473
+ Permission is hereby granted, free of charge, to any person obtaining
474
+ a copy of this software and associated documentation files (the
475
+ 'Software'), to deal in the Software without restriction, including
476
+ without limitation the rights to use, copy, modify, merge, publish,
477
+ distribute, sublicense, and/or sell copies of the Software, and to
478
+ permit persons to whom the Software is furnished to do so, subject to
479
+ the following conditions:
480
+
481
+ The above copyright notice and this permission notice shall be
482
+ included in all copies or substantial portions of the Software.
483
+
484
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
485
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
486
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
487
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
488
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
489
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
490
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.