Project

harp2hugo

0.0
No commit activity in last 3 years
No release in over 3 years
converts your Harp _data.json meta data into Hugo's front matter format
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.6
>= 0
>= 0

Runtime

~> 0.19
 Project Readme

Harp2hugo

Gem Version

Gem for converting posts from Harp metadata json into Hugo Front Matter format.

Used in https://www.yunspace.com/

Usage

$ gem install harp2hugo
$ harp2hugo [input_file] [output_dir]

Where input_file defaults to _data.json and output_dir defaults to output. NOTE: the output dir will be created relative to your input file directory.

$ harp2hugo public/posts/_data.json output

Logic is to loop through each post specified in _data.json file:

  1. Reads in the metadata in JSON format
  2. Convert metadata to YAML format and prepend to the post
  3. Write the new post with prepended metadata into output directory.

Disclaimer

Currently still work in progress. Written with plenty of help from @nagliyvred

Contributing

  1. Fork it ( https://github.com/yunspace/harp2hugo/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request