node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »



A script to convert posts from Jekyll to Harp


  • 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)


npm install -g jekyll2harp

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

git clone
cd jekyll2harp
npm install
npm link


% jekyll2harp -h                                                                                                                                                                  ✭
  Usage: jekyll2harp [options] <file ...>
    -h, --help                  output usage information
    -V, --version               output the version number
    -s --skip_keys <skip_keys>  Skip keys
    -d --dest <dest>            Destination directory


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


  • Add sorting (+/-fieldname)