This is experimental.
Example:
-# Sunset solar eclipse to brush Columbus Sunday
-- Ben Keith
-- benlkeith
-- 2012-05-18 04:19
-- Blog
-- published
+---
+title: 'Sunset solar eclipse to brush Columbus Sunday'
+author: Ben Keith
+twitter_handle: benlkeith
+date: 2012-05-18
+time: 04:19
+categories: Blog
+classes: published
+---
How to use this:
- Copy your Dropplets post markdown files into your jekyll site's
_posts
directory- If your site's filenames are not named with the extension
.md
, rename them now, or editscript.sh
to read from a different filename.
- If your site's filenames are not named with the extension
- Clone this repository in the same directory that contains your
_posts
directory, so that your directory layout looks like this:├── 404.html ├── Gemfile ├── Gemfile.lock ├── _config.yml ├── _posts │ └── example.md ├── _site ├── converter │ ├── convert.py │ ├── requirements.txt │ └── script.sh └── index.md
- in the converter directory, run
pip install -r requirements.txt
.- I recommend using a virtualenv with virtualenvwrapper.
- We're only using this to install Chris Amico's frontmatter library from pypi. This script uses frontmatter to make sure that the post-conversion frontmatter is validly formatted, and it's only partially effective at doing so. Jekyll barfs on some things; it's best to run
jekyll serve
orjekyll build
to make sure. If you don't want to rely onfrontmatter
, delete the line inconvert.py
inmain
that callsfrontmatter_parse
- copy
script.sh
from/converter
to the parent directory:├── 404.html ├── Gemfile ├── Gemfile.lock ├── _config.yml ├── _posts │ └── example.md ├── _site ├── converter │ ├── convert.py │ └── requirements.txt ├── index.md └── script.sh
- Run the converter:
./script.sh
.
This assumes:
- that you're running Python 2 as
python
- that your files are named
.md
- that your files are using
\n
for end-of-line; usedos2unix
to fix this if not. - some things that were true for my files that may not be true for yours; see the contents of
convert.py
. I hacked the "post status" line item to support multiple words, which were then added as class names and separate templates. For more about that, see the dropplets template I was using.