monad 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CONTRIBUTING.markdown +91 -0
- data/Gemfile +1 -1
- data/History.markdown +772 -0
- data/{README.md → README.markdown} +5 -2
- data/Rakefile +163 -1
- data/bin/monad +86 -30
- data/features/create_sites.feature +54 -25
- data/features/data.feature +65 -0
- data/features/data_sources.feature +10 -10
- data/features/drafts.feature +5 -5
- data/features/embed_filters.feature +10 -10
- data/features/include_tag.feature +48 -0
- data/features/markdown.feature +5 -5
- data/features/pagination.feature +38 -10
- data/features/permalinks.feature +31 -11
- data/features/post_data.feature +41 -41
- data/features/post_excerpts.feature +50 -0
- data/features/site_configuration.feature +47 -26
- data/features/site_data.feature +30 -24
- data/features/step_definitions/{monad_steps.rb → jekyll_steps.rb} +66 -52
- data/features/support/env.rb +27 -8
- data/lib/jekyll.rb +99 -0
- data/lib/jekyll/cleaner.rb +73 -0
- data/lib/{monad → jekyll}/command.rb +6 -6
- data/lib/{monad → jekyll}/commands/build.rb +9 -9
- data/lib/jekyll/commands/doctor.rb +67 -0
- data/lib/jekyll/commands/new.rb +67 -0
- data/lib/jekyll/commands/serve.rb +65 -0
- data/lib/{monad → jekyll}/configuration.rb +60 -18
- data/lib/{monad → jekyll}/converter.rb +1 -1
- data/lib/{monad → jekyll}/converters/identity.rb +1 -1
- data/lib/{monad → jekyll}/converters/markdown.rb +2 -2
- data/lib/jekyll/converters/markdown/kramdown_parser.rb +29 -0
- data/lib/{monad → jekyll}/converters/markdown/maruku_parser.rb +12 -8
- data/lib/{monad → jekyll}/converters/markdown/rdiscount_parser.rb +4 -2
- data/lib/{monad → jekyll}/converters/markdown/redcarpet_parser.rb +1 -1
- data/lib/{monad → jekyll}/converters/textile.rb +1 -1
- data/lib/{monad → jekyll}/convertible.rb +39 -17
- data/lib/{monad → jekyll}/core_ext.rb +22 -4
- data/lib/jekyll/deprecator.rb +36 -0
- data/lib/{monad → jekyll}/draft.rb +1 -1
- data/lib/{monad → jekyll}/drivers/json_driver.rb +1 -1
- data/lib/{monad → jekyll}/drivers/yaml_driver.rb +1 -1
- data/lib/{monad → jekyll}/errors.rb +1 -1
- data/lib/jekyll/excerpt.rb +113 -0
- data/lib/{monad → jekyll}/filters.rb +16 -6
- data/lib/{monad → jekyll}/generator.rb +1 -1
- data/lib/jekyll/generators/pagination.rb +214 -0
- data/lib/{monad → jekyll}/layout.rb +4 -1
- data/lib/{monad → jekyll}/mime.types +0 -0
- data/lib/{monad → jekyll}/page.rb +36 -39
- data/lib/{monad → jekyll}/plugin.rb +1 -1
- data/lib/{monad → jekyll}/post.rb +58 -123
- data/lib/jekyll/related_posts.rb +59 -0
- data/lib/{monad → jekyll}/site.rb +120 -123
- data/lib/{monad → jekyll}/static_file.rb +1 -1
- data/lib/jekyll/stevenson.rb +89 -0
- data/lib/jekyll/tags/gist.rb +48 -0
- data/lib/{monad → jekyll}/tags/highlight.rb +3 -3
- data/lib/jekyll/tags/include.rb +135 -0
- data/lib/{monad → jekyll}/tags/post_url.rb +8 -6
- data/lib/jekyll/url.rb +67 -0
- data/lib/monad.rb +36 -27
- data/lib/site_template/_config.yml +2 -1
- data/lib/site_template/_layouts/default.html +21 -23
- data/lib/site_template/_layouts/post.html +1 -1
- data/lib/site_template/_posts/{0000-00-00-welcome-to-monad.markdown.erb → 0000-00-00-welcome-to-jekyll.markdown.erb} +6 -6
- data/lib/site_template/css/main.css +22 -27
- data/lib/site_template/index.html +2 -2
- data/monad.gemspec +153 -52
- data/site/.gitignore +4 -0
- data/site/CNAME +1 -0
- data/site/README +1 -0
- data/site/_config.yml +6 -0
- data/site/_includes/analytics.html +32 -0
- data/site/_includes/docs_contents.html +16 -0
- data/site/_includes/docs_contents_mobile.html +23 -0
- data/site/_includes/docs_option.html +11 -0
- data/site/_includes/docs_ul.html +20 -0
- data/site/_includes/footer.html +15 -0
- data/site/_includes/header.html +18 -0
- data/site/_includes/news_contents.html +23 -0
- data/site/_includes/news_contents_mobile.html +11 -0
- data/site/_includes/news_item.html +24 -0
- data/site/_includes/primary-nav-items.html +14 -0
- data/site/_includes/section_nav.html +22 -0
- data/site/_includes/top.html +17 -0
- data/site/_layouts/default.html +12 -0
- data/site/_layouts/docs.html +23 -0
- data/site/_layouts/news.html +19 -0
- data/site/_layouts/news_item.html +27 -0
- data/site/_posts/2013-05-06-jekyll-1-0-0-released.markdown +23 -0
- data/site/_posts/2013-05-08-jekyll-1-0-1-released.markdown +27 -0
- data/site/_posts/2013-05-12-jekyll-1-0-2-released.markdown +28 -0
- data/site/_posts/2013-06-07-jekyll-1-0-3-released.markdown +25 -0
- data/site/_posts/2013-07-14-jekyll-1-1-0-released.markdown +27 -0
- data/site/_posts/2013-07-24-jekyll-1-1-1-released.markdown +31 -0
- data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +20 -0
- data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +20 -0
- data/site/_posts/2013-09-06-jekyll-1-2-0-released.markdown +23 -0
- data/site/_posts/2013-09-14-jekyll-1-2-1-released.markdown +19 -0
- data/site/css/gridism.css +110 -0
- data/site/css/normalize.css +1 -0
- data/site/css/pygments.css +70 -0
- data/site/css/style.css +946 -0
- data/site/docs/configuration.md +373 -0
- data/site/docs/contributing.md +128 -0
- data/site/docs/datafiles.md +63 -0
- data/site/docs/deployment-methods.md +109 -0
- data/site/docs/drafts.md +20 -0
- data/site/docs/extras.md +56 -0
- data/site/docs/frontmatter.md +180 -0
- data/site/docs/github-pages.md +91 -0
- data/site/docs/heroku.md +9 -0
- data/site/docs/history.md +722 -0
- data/site/docs/index.md +52 -0
- data/site/docs/installation.md +76 -0
- data/site/docs/migrations.md +257 -0
- data/site/docs/pages.md +86 -0
- data/site/docs/pagination.md +211 -0
- data/site/docs/permalinks.md +180 -0
- data/site/docs/plugins.md +508 -0
- data/site/docs/posts.md +181 -0
- data/site/docs/quickstart.md +32 -0
- data/site/docs/resources.md +46 -0
- data/site/docs/sites.md +29 -0
- data/site/docs/structure.md +190 -0
- data/site/docs/templates.md +319 -0
- data/site/docs/troubleshooting.md +150 -0
- data/site/docs/upgrading.md +146 -0
- data/site/docs/usage.md +63 -0
- data/site/docs/variables.md +322 -0
- data/site/favicon.png +0 -0
- data/site/feed.xml +36 -0
- data/site/freenode.txt +1 -0
- data/site/img/article-footer.png +0 -0
- data/site/img/footer-arrow.png +0 -0
- data/site/img/footer-logo.png +0 -0
- data/site/img/logo-2x.png +0 -0
- data/site/img/octojekyll.png +0 -0
- data/site/img/tube.png +0 -0
- data/site/img/tube1x.png +0 -0
- data/site/index.html +90 -0
- data/site/js/modernizr-2.5.3.min.js +4 -0
- data/site/news/index.html +10 -0
- data/site/news/releases/index.html +10 -0
- data/test/helper.rb +6 -3
- data/test/source/+/foo.md +7 -0
- data/test/source/_data/languages.yml +2 -0
- data/test/source/_data/members.yaml +7 -0
- data/test/source/_data/products.yml +4 -0
- data/test/source/_includes/params.html +7 -0
- data/test/source/_layouts/default.html +1 -1
- data/test/source/_layouts/post/simple.html +1 -0
- data/test/source/_plugins/dummy.rb +1 -1
- data/test/source/_posts/2013-01-02-post-excerpt.markdown +1 -1
- data/test/source/_posts/2013-07-22-post-excerpt-with-layout.markdown +23 -0
- data/test/source/_posts/2013-08-01-mkdn-extension.mkdn +0 -0
- data/test/source/deal.with.dots.html +1 -1
- data/test/source/products.yml +4 -0
- data/test/test_configuration.rb +46 -11
- data/test/test_convertible.rb +2 -2
- data/test/test_excerpt.rb +78 -0
- data/test/test_filters.rb +4 -4
- data/test/test_generated_site.rb +13 -13
- data/test/test_json_driver.rb +9 -9
- data/test/test_kramdown.rb +32 -5
- data/test/test_new_command.rb +8 -8
- data/test/test_page.rb +12 -3
- data/test/test_pager.rb +34 -33
- data/test/test_post.rb +34 -26
- data/test/test_redcloth.rb +3 -3
- data/test/test_related_posts.rb +47 -0
- data/test/test_site.rb +102 -44
- data/test/test_tags.rb +168 -23
- data/test/test_url.rb +28 -0
- data/test/test_yaml_driver.rb +6 -6
- metadata +215 -137
- data/lib/monad/commands/doctor.rb +0 -29
- data/lib/monad/commands/new.rb +0 -50
- data/lib/monad/commands/serve.rb +0 -33
- data/lib/monad/converters/markdown/kramdown_parser.rb +0 -44
- data/lib/monad/deprecator.rb +0 -32
- data/lib/monad/generators/pagination.rb +0 -143
- data/lib/monad/logger.rb +0 -54
- data/lib/monad/tags/gist.rb +0 -30
- data/lib/monad/tags/include.rb +0 -37
data/site/docs/index.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
---
|
2
|
+
layout: docs
|
3
|
+
title: Welcome
|
4
|
+
next_section: quickstart
|
5
|
+
permalink: /docs/home/
|
6
|
+
---
|
7
|
+
|
8
|
+
This site aims to be a comprehensive guide to Jekyll. We’ll cover topics such
|
9
|
+
as getting your site up and running, creating and managing your content,
|
10
|
+
customizing the way your site works and looks, deploying to various
|
11
|
+
environments, and give you some advice on participating in the future
|
12
|
+
development of Jekyll itself.
|
13
|
+
|
14
|
+
## So what is Jekyll, exactly?
|
15
|
+
|
16
|
+
Jekyll is a simple, blog-aware, static site generator. It takes a template
|
17
|
+
directory containing raw text files in various formats, runs it through
|
18
|
+
[Markdown](http://daringfireball.net/projects/markdown/) (or
|
19
|
+
[Textile](http://textile.sitemonks.com/)) and
|
20
|
+
[Liquid](http://wiki.shopify.com/Liquid)
|
21
|
+
converters, and spits out a complete, ready-to-publish static website suitable
|
22
|
+
for serving with your favorite web server. Jekyll also happens to be the engine
|
23
|
+
behind [GitHub Pages](http://pages.github.com), which means you can use Jekyll
|
24
|
+
to host your project’s page, blog, or website from GitHub’s servers **for
|
25
|
+
free**.
|
26
|
+
|
27
|
+
## ProTips™, Notes, and Warnings
|
28
|
+
|
29
|
+
Throughout this guide there are a number of small-but-handy pieces of
|
30
|
+
information that can make using Jekyll easier, more interesting, and less
|
31
|
+
hazardous. Here’s what to look out for.
|
32
|
+
|
33
|
+
<div class="note">
|
34
|
+
<h5>ProTips™ help you get more from Jekyll</h5>
|
35
|
+
<p>These are tips and tricks that will help you be a Jekyll wizard!</p>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<div class="note info">
|
39
|
+
<h5>Notes are handy pieces of information</h5>
|
40
|
+
<p>These are for the extra tidbits sometimes necessary to understand
|
41
|
+
Jekyll.</p>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<div class="note warning">
|
45
|
+
<h5>Warnings help you not blow things up</h5>
|
46
|
+
<p>Be aware of these messages if you wish to avoid certain death.</p>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
If you come across anything along the way that we haven’t covered, or if you
|
50
|
+
know of a tip you think others would find handy, please [file an
|
51
|
+
issue]({{ site.repository }}/issues/new) and we’ll see about
|
52
|
+
including it in this guide.
|
@@ -0,0 +1,76 @@
|
|
1
|
+
---
|
2
|
+
layout: docs
|
3
|
+
title: Installation
|
4
|
+
prev_section: quickstart
|
5
|
+
next_section: usage
|
6
|
+
permalink: /docs/installation/
|
7
|
+
---
|
8
|
+
|
9
|
+
Getting Jekyll installed and ready-to-go should only take a few minutes. If it
|
10
|
+
ever becomes a pain in the ass, please [file an
|
11
|
+
issue]({{ site.repository }}/issues/new) (or submit a pull request)
|
12
|
+
describing the issue you encountered and how we might make the process easier.
|
13
|
+
|
14
|
+
### Requirements
|
15
|
+
|
16
|
+
Installing Jekyll is easy and straight-forward, but there are a few requirements
|
17
|
+
you’ll need to make sure your system has before you start.
|
18
|
+
|
19
|
+
- [Ruby](http://www.ruby-lang.org/en/downloads/)
|
20
|
+
- [RubyGems](http://rubygems.org/pages/download)
|
21
|
+
- Linux, Unix, or Mac OS X
|
22
|
+
|
23
|
+
<div class="note info">
|
24
|
+
<h5>Running Jekyll on Windows</h5>
|
25
|
+
<p>
|
26
|
+
It is possible to get
|
27
|
+
<a href="http://www.madhur.co.in/blog/2011/09/01/runningjekyllwindows.html">
|
28
|
+
Jekyll running on Windows</a>, but the official documentation does not
|
29
|
+
support installation on Windows platforms.
|
30
|
+
</p>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
## Install with RubyGems
|
34
|
+
|
35
|
+
The best way to install Jekyll is via
|
36
|
+
[RubyGems](http://docs.rubygems.org/read/chapter/3). At the terminal prompt,
|
37
|
+
simply run the following command to install Jekyll:
|
38
|
+
|
39
|
+
{% highlight bash %}
|
40
|
+
$ gem install jekyll
|
41
|
+
{% endhighlight %}
|
42
|
+
|
43
|
+
All of Jekyll’s gem dependencies are automatically installed by the above
|
44
|
+
command, so you won’t have to worry about them at all. If you have problems
|
45
|
+
installing Jekyll, check out the [troubleshooting](../troubleshooting/) page or
|
46
|
+
[report an issue]({{ site.repository }}/issues/new) so the Jekyll
|
47
|
+
community can improve the experience for everyone.
|
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 → Downloads → Components</code>.
|
56
|
+
</p>
|
57
|
+
</div>
|
58
|
+
|
59
|
+
## Optional Extras
|
60
|
+
|
61
|
+
There are a number of (optional) extra features that Jekyll supports that you
|
62
|
+
may want to install, depending on how you plan to use Jekyll. These extras
|
63
|
+
include LaTeX support, and the use of alternative content rendering engines.
|
64
|
+
Check out [the extras page](../extras/) for more information.
|
65
|
+
|
66
|
+
<div class="note">
|
67
|
+
<h5>ProTip™: Enable Syntax Highlighting</h5>
|
68
|
+
<p>
|
69
|
+
If you’re the kind of person who is using Jekyll, then chances are you’ll
|
70
|
+
want to enable syntax highlighting using Pygments. You should really
|
71
|
+
<a href="../templates/#code_snippet_highlighting">check out how to do
|
72
|
+
that</a> before you go any further.
|
73
|
+
</p>
|
74
|
+
</div>
|
75
|
+
|
76
|
+
Now that you’ve got everything installed, let’s get to work!
|
@@ -0,0 +1,257 @@
|
|
1
|
+
---
|
2
|
+
layout: docs
|
3
|
+
title: Blog migrations
|
4
|
+
prev_section: datafiles
|
5
|
+
next_section: templates
|
6
|
+
permalink: /docs/migrations/
|
7
|
+
---
|
8
|
+
|
9
|
+
If you’re switching to Jekyll from another blogging system, Jekyll’s importers
|
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
|
+
<div class="note warning">
|
28
|
+
<h5>Jekyll-import requires you to manually install some dependencies.</h5>
|
29
|
+
<p markdown="1">If you are importing your blog from Drupal 6,7, Joomla,
|
30
|
+
Mephisto, Movable Type, Textpattern, or Typo (with mysql db), you need to install
|
31
|
+
`mysql` and `sequel` gems. If you are importing from a WordPress database, you
|
32
|
+
need to install `mysql2` and `sequel` gems, and if you are importing from Enki
|
33
|
+
or Typo (with postgresql db) you need to install `pg` and `sequel` gems.</p>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
You should now be all set to run the importers below. If you ever get stuck, you
|
37
|
+
can see help for each importer:
|
38
|
+
|
39
|
+
{% highlight bash %}
|
40
|
+
$ jekyll help import # => See list of importers
|
41
|
+
$ jekyll help import IMPORTER # => See importer specific help
|
42
|
+
{% endhighlight %}
|
43
|
+
|
44
|
+
Where IMPORTER is the name of the specific importer.
|
45
|
+
|
46
|
+
<div class="note info">
|
47
|
+
<h5>Note: Always double-check migrated content</h5>
|
48
|
+
<p>
|
49
|
+
|
50
|
+
Importers may not distinguish between published or private posts, so
|
51
|
+
you should always check that the content Jekyll generates for you appears as
|
52
|
+
you intended.
|
53
|
+
|
54
|
+
</p>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<!-- TODO all these need to be fixed -->
|
58
|
+
|
59
|
+
## WordPress
|
60
|
+
|
61
|
+
### WordPress export files
|
62
|
+
|
63
|
+
If hpricot is not already installed, you will need to run `gem install hpricot`.
|
64
|
+
Next, export your blog using the WordPress export utility. Assuming that the
|
65
|
+
exported file is saved as `wordpress.xml`, here is the command you need to run:
|
66
|
+
|
67
|
+
{% highlight bash %}
|
68
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpressdotcom";
|
69
|
+
JekyllImport::WordpressDotCom.process({ :source => "wordpress.xml" })'
|
70
|
+
{% endhighlight %}
|
71
|
+
|
72
|
+
<div class="note">
|
73
|
+
<h5>ProTip™: WordPress.com Export Tool</h5>
|
74
|
+
<p markdown="1">If you are migrating from a WordPress.com account, you can
|
75
|
+
access the export tool at the following URL:
|
76
|
+
`https://YOUR-USER-NAME.wordpress.com/wp-admin/export.php`.</p>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
### Using WordPress MySQL server connection
|
80
|
+
|
81
|
+
If you want to import using a direct connection to the WordPress MySQL server,
|
82
|
+
here's how:
|
83
|
+
|
84
|
+
{% highlight bash %}
|
85
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpress";
|
86
|
+
JekyllImport::WordPress.process({:dbname => "database", :user => "user", :pass => "pass"})'
|
87
|
+
{% endhighlight %}
|
88
|
+
|
89
|
+
If you are using Webfaction and have to set up an [SSH
|
90
|
+
tunnel](http://docs.webfaction.com/user-guide/databases.html?highlight=mysql#starting-an-ssh-tunnel-with-ssh),
|
91
|
+
be sure to make the hostname (`127.0.0.1`) explicit, otherwise MySQL may block
|
92
|
+
your access based on `localhost` and `127.0.0.1` not being equivalent in its
|
93
|
+
authentication system:
|
94
|
+
|
95
|
+
{% highlight bash %}
|
96
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpress";
|
97
|
+
JekyllImport::WordPress.process({:host => "127.0.0.1", :dbname => "database", :user => "user", :pass => "pass"})'
|
98
|
+
{% endhighlight %}
|
99
|
+
|
100
|
+
### Further WordPress migration alternatives
|
101
|
+
|
102
|
+
While the above methods work, they do not import much of the metadata that is
|
103
|
+
usually stored in WordPress posts and pages. If you need to export things like
|
104
|
+
pages, tags, custom fields, image attachments and so on, the following resources
|
105
|
+
might be useful to you:
|
106
|
+
|
107
|
+
- [Exitwp](https://github.com/thomasf/exitwp) is a configurable tool written in
|
108
|
+
Python for migrating one or more WordPress blogs into Jekyll (Markdown) format
|
109
|
+
while keeping as much metadata as possible. Exitwp also downloads attachments
|
110
|
+
and pages.
|
111
|
+
- [A great
|
112
|
+
article](http://vitobotta.com/how-to-migrate-from-wordpress-to-jekyll/) with a
|
113
|
+
step-by-step guide for migrating a WordPress blog to Jekyll while keeping most
|
114
|
+
of the structure and metadata.
|
115
|
+
- [wpXml2Jekyll](https://github.com/theaob/wpXml2Jekyll) is an executable
|
116
|
+
windows application for creating Markdown posts from your WordPress XML file.
|
117
|
+
|
118
|
+
## Drupal
|
119
|
+
|
120
|
+
If you’re migrating from [Drupal](http://drupal.org), there are two migrators
|
121
|
+
for you, depending upon your Drupal version:
|
122
|
+
- [Drupal 6](https://github.com/jekyll/jekyll-import/blob/v0.1.0.beta1/lib/jekyll/jekyll-import/drupal6.rb)
|
123
|
+
- [Drupal 7](https://github.com/jekyll/jekyll-import/blob/v0.1.0.beta1/lib/jekyll/jekyll-import/drupal7.rb)
|
124
|
+
|
125
|
+
{% highlight bash %}
|
126
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal6";
|
127
|
+
JekyllImport::Drupal6.process("dbname", "user", "pass")'
|
128
|
+
# ... or ...
|
129
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal7";
|
130
|
+
JekyllImport::Drupal7.process("dbname", "user", "pass")'
|
131
|
+
{% endhighlight %}
|
132
|
+
|
133
|
+
If you are connecting to a different host or need to specify a table prefix for
|
134
|
+
your database, you may optionally add those two parameters to the end of either
|
135
|
+
Drupal migrator execution:
|
136
|
+
|
137
|
+
{% highlight bash %}
|
138
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal6";
|
139
|
+
JekyllImport::Drupal6.process("dbname", "user", "pass", "host", "table_prefix")'
|
140
|
+
# ... or ...
|
141
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal7";
|
142
|
+
JekyllImport::Drupal7.process("dbname", "user", "pass", "host", "table_prefix")'
|
143
|
+
{% endhighlight %}
|
144
|
+
|
145
|
+
## Movable Type
|
146
|
+
|
147
|
+
To import posts from Movable Type:
|
148
|
+
|
149
|
+
{% highlight bash %}
|
150
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/mt";
|
151
|
+
JekyllImport::MT.process("database", "user", "pass")'
|
152
|
+
{% endhighlight %}
|
153
|
+
|
154
|
+
## Typo
|
155
|
+
|
156
|
+
To import posts from Typo:
|
157
|
+
|
158
|
+
{% highlight bash %}
|
159
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/typo";
|
160
|
+
JekyllImport::Typo.process("database", "user", "pass")'
|
161
|
+
{% endhighlight %}
|
162
|
+
|
163
|
+
This code has only been tested with Typo version 4+.
|
164
|
+
|
165
|
+
## TextPattern
|
166
|
+
|
167
|
+
To import posts from TextPattern:
|
168
|
+
|
169
|
+
{% highlight bash %}
|
170
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/textpattern";
|
171
|
+
JekyllImport::TextPattern.process("database_name", "username", "password", "hostname")'
|
172
|
+
{% endhighlight %}
|
173
|
+
|
174
|
+
You will need to run the above from the parent directory of your `_import`
|
175
|
+
folder. For example, if `_import` is located in `/path/source/_import`, you will
|
176
|
+
need to run this code from `/path/source`. The hostname defaults to `localhost`,
|
177
|
+
all other variables are required. You may need to adjust the code used to filter
|
178
|
+
entries. Left alone, it will attempt to pull all entries that are live or
|
179
|
+
sticky.
|
180
|
+
|
181
|
+
## Mephisto
|
182
|
+
|
183
|
+
To import posts from Mephisto:
|
184
|
+
|
185
|
+
{% highlight bash %}
|
186
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/mephisto";
|
187
|
+
JekyllImport::Mephisto.process("database", "user", "password")'
|
188
|
+
{% endhighlight %}
|
189
|
+
|
190
|
+
If your data is in Postgres, you should do this instead:
|
191
|
+
|
192
|
+
{% highlight bash %}
|
193
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/mephisto";
|
194
|
+
JekyllImport::Mephisto.postgres({:database => "database", :username=>"username", :password =>"password"})'
|
195
|
+
{% endhighlight %}
|
196
|
+
|
197
|
+
## Blogger (Blogspot)
|
198
|
+
|
199
|
+
To import posts from Blogger, see [this post about migrating from Blogger to
|
200
|
+
Jekyll](http://blog.coolaj86.com/articles/migrate-from-blogger-to-jekyll.html). If
|
201
|
+
that doesn’t work for you, you might want to try some of the following
|
202
|
+
alternatives:
|
203
|
+
|
204
|
+
- [@kennym](https://github.com/kennym) created a [little migration
|
205
|
+
script](https://gist.github.com/1115810), because the solutions in the
|
206
|
+
previous article didn't work out for him.
|
207
|
+
- [@ngauthier](https://github.com/ngauthier) created [another
|
208
|
+
importer](https://gist.github.com/1506614) that imports comments, and does so
|
209
|
+
via blogger’s archive instead of the RSS feed.
|
210
|
+
- [@juniorz](https://github.com/juniorz) created [yet another
|
211
|
+
importer](https://gist.github.com/1564581) that works for
|
212
|
+
[Octopress](http://octopress.org). It is like [@ngauthier’s
|
213
|
+
version](https://gist.github.com/1506614) but separates drafts from posts, as
|
214
|
+
well as importing tags and permalinks.
|
215
|
+
|
216
|
+
## Posterous
|
217
|
+
|
218
|
+
To import posts from your primary Posterous blog:
|
219
|
+
|
220
|
+
{% highlight bash %}
|
221
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/posterous";
|
222
|
+
JekyllImport::Posterous.process("my_email", "my_pass")'
|
223
|
+
{% endhighlight %}
|
224
|
+
|
225
|
+
For any other Posterous blog on your account, you will need to specify the
|
226
|
+
`blog_id` for the blog:
|
227
|
+
|
228
|
+
{% highlight bash %}
|
229
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/posterous";
|
230
|
+
JekyllImport::Posterous.process("my_email", "my_pass", "blog_id")'
|
231
|
+
{% endhighlight %}
|
232
|
+
|
233
|
+
There is also an [alternative Posterous
|
234
|
+
migrator](https://github.com/pepijndevos/jekyll/blob/patch-1/lib/jekyll/migrators/posterous.rb)
|
235
|
+
that maintains permalinks and attempts to import images too.
|
236
|
+
|
237
|
+
## Tumblr
|
238
|
+
|
239
|
+
To import posts from Tumblr:
|
240
|
+
|
241
|
+
{% highlight bash %}
|
242
|
+
$ ruby -rubygems -e 'require "jekyll/jekyll-import/tumblr";
|
243
|
+
JekyllImport::Tumblr.process(url, format, grab_images, add_highlights, rewrite_urls)'
|
244
|
+
# url - String: your blog's URL
|
245
|
+
# format - String: the output file extension. Use "md" to have your content
|
246
|
+
# converted from HTML to Markdown. Defaults to "html".
|
247
|
+
# grab_images - Boolean: whether to download images as well. Defaults to false.
|
248
|
+
# add_highlights - Boolean: whether to wrap code blocks (indented 4 spaces) in a Liquid
|
249
|
+
"highlight" tag. Defaults to false.
|
250
|
+
# rewrite_urls - Boolean: whether to write pages that redirect from the old Tumblr paths
|
251
|
+
to the new Jekyll paths. Defaults to false.
|
252
|
+
{% endhighlight %}
|
253
|
+
|
254
|
+
## Other Systems
|
255
|
+
|
256
|
+
If you have a system for which there is currently no migrator, consider writing
|
257
|
+
one and sending us [a pull request](https://github.com/jekyll/jekyll-import).
|
data/site/docs/pages.md
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
---
|
2
|
+
layout: docs
|
3
|
+
title: Creating pages
|
4
|
+
prev_section: posts
|
5
|
+
next_section: variables
|
6
|
+
permalink: /docs/pages/
|
7
|
+
---
|
8
|
+
|
9
|
+
In addition to [writing posts](../posts/), another thing you may want to do with
|
10
|
+
your Jekyll site is create static pages. By taking advantage of the way Jekyll
|
11
|
+
copies files and directories, this is easy to do.
|
12
|
+
|
13
|
+
## Homepage
|
14
|
+
|
15
|
+
Just about every web server configuration you come across will look for an HTML
|
16
|
+
file called `index.html` (by convention) in the site's root folder and display
|
17
|
+
that as the homepage. Unless the web server you’re using is configured to look
|
18
|
+
for some different filename as the default, this file will turn into the
|
19
|
+
homepage of your Jekyll-generated site.
|
20
|
+
|
21
|
+
<div class="note">
|
22
|
+
<h5>ProTip™: Use layouts on your homepage</h5>
|
23
|
+
<p>
|
24
|
+
Any HTML file on your site can use layouts and/or includes, even the
|
25
|
+
homepage. Common content, like headers and footers, make excellent
|
26
|
+
candidates for extraction into a layout.
|
27
|
+
</p>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
## Where additional pages live
|
31
|
+
|
32
|
+
Where you put HTML files for pages depends on how you want the pages to work.
|
33
|
+
There are two main ways of creating pages:
|
34
|
+
|
35
|
+
- Place named HTML files for each page in your site's root folder.
|
36
|
+
- Create a folder in the site's root for each page, and place an index.html file
|
37
|
+
in each page folder.
|
38
|
+
|
39
|
+
Both methods work fine (and can be used in conjunction with each other),
|
40
|
+
with the only real difference being the resulting URLs.
|
41
|
+
|
42
|
+
### Named HTML files
|
43
|
+
|
44
|
+
The simplest way of adding a page is just to add an HTML file in the root
|
45
|
+
directory with a suitable name for the page you want to create. For a site with
|
46
|
+
a homepage, an about page, and a contact page, here’s what the root directory
|
47
|
+
and associated URLs might look like:
|
48
|
+
|
49
|
+
{% highlight bash %}
|
50
|
+
.
|
51
|
+
|-- _config.yml
|
52
|
+
|-- _includes/
|
53
|
+
|-- _layouts/
|
54
|
+
|-- _posts/
|
55
|
+
|-- _site/
|
56
|
+
|-- about.html # => http://yoursite.com/about.html
|
57
|
+
|-- index.html # => http://yoursite.com/
|
58
|
+
└── contact.html # => http://yoursite.com/contact.html
|
59
|
+
{% endhighlight %}
|
60
|
+
|
61
|
+
### Named folders containing index HTML files
|
62
|
+
|
63
|
+
There is nothing wrong with the above method, however some people like to keep
|
64
|
+
their URLs free from things like filename extensions. To achieve clean URLs for
|
65
|
+
pages using Jekyll, you simply need to create a folder for each top-level page
|
66
|
+
you want, and then place an `index.html` file in each page’s folder. This way
|
67
|
+
the page URL ends up being the folder name, and the web server will serve up the
|
68
|
+
respective `index.html` file. Here's an example of what this structure might
|
69
|
+
look like:
|
70
|
+
|
71
|
+
{% highlight bash %}
|
72
|
+
.
|
73
|
+
├── _config.yml
|
74
|
+
├── _includes/
|
75
|
+
├── _layouts/
|
76
|
+
├── _posts/
|
77
|
+
├── _site/
|
78
|
+
├── about/
|
79
|
+
| └── index.html # => http://yoursite.com/about/
|
80
|
+
├── contact/
|
81
|
+
| └── index.html # => http://yoursite.com/contact/
|
82
|
+
└── index.html # => http://yoursite.com/
|
83
|
+
{% endhighlight %}
|
84
|
+
|
85
|
+
This approach may not suit everyone, but for people who like clean URLs it’s
|
86
|
+
simple and it works. In the end the decision is yours!
|