Coder Social home page Coder Social logo

jekyll2harp's Introduction

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 [email protected]: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)

jekyll2harp's People

Contributors

edrex avatar

Stargazers

Lucas avatar Jordiet Yahii avatar David Avellaneda avatar Harald Haesler avatar Sal Rahman avatar Bret Comnes avatar Kenneth Ormandy avatar Richard Eriksson avatar Shmavon Gazanchyan avatar Brock Whitten avatar

Watchers

 avatar Kenneth Ormandy avatar  avatar

jekyll2harp's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.