GitXplorerGitXplorer
e

jekyll2harp

public
10 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
a4ea9d3ca081cb63c38811d70bd483ca6c730890

reverse order so newest posts are listed first

eedrex committed 11 years ago
Unverified
a829df9c89d3ffd49d2b205bce3dd63ddb7eb973

update version

eedrex committed 11 years ago
Unverified
4e5a59779e1e00c959438a1c835151914663fda0

add example

eedrex committed 11 years ago
Unverified
e0655586818747119fa318bde4404825d71972da

Update README.md

eedrex committed 11 years ago
Unverified
8385c0e744f5bee4378adaa2076038fcb3197bda

Update README.md

eedrex committed 11 years ago
Unverified
7e2f56c8be0180e56e5b39b95275e665dd687d62

Create README.md

eedrex committed 11 years ago

README

The README file for this repository.

jekyll2harp

A script to convert posts from Jekyll to Harp

Example:

cd mysite/_posts
jekyll2harp -d ./out mysite/_posts/*.md

Features

  • Parses YAML metadata
  • Parses leading dates in file names
  • Outputs files with metadata stripped
  • Saves metadata to _data.json
  • Outputs to a fresh directory, never modifies existing files or folders
  • Strips out metadata keys specified with -s

Things to know

  • The order of documents in _data.json is the order that you specify files in. You may have to reorder after converting.
  • Think carefully about which metadata fields you want to strip out. The defaults are layout and published.
  • This script doesn't try to preserve old URLs. This sort of thing is possible, but depends on how you plan to deploy (nginx, apache, s3, etc)

Install

npm install -g jekyll2harp

Or if you want to hack on it (pull requests welcome) run it from source like so:

git clone git@github.com:edrex/jekyll2harp.git
cd jekyll2harp
npm install
npm link

Usage

% jekyll2harp -h                                                                                                                                                                  ✭

  Usage: jekyll2harp [options] <file ...>

  Options:

    -h, --help                  output usage information
    -V, --version               output the version number
    -s --skip_keys <skip_keys>  Skip keys
    -d --dest <dest>            Destination directory

TODO

  • Add sorting (+/-fieldname)