CLI tool for batch updating jekyll markdown content files to markdown files useable by Gatsby (changing the date and slug)
Given a directory of Jekyll markdown post files, with a structure like this:
- some-folder
- 2012-02-23-a-post.md
- 2020-06-12-another-post.md
Will batch process and output the posts in an output
folder (configurable), extracting the date from the file name.
It also adds the date
field in the frontmatter header of each post so Gatsby can find the date.
New structure (based on the structure used in the Gatsby Starter Blog:
- some-folder
- a-post
- index.md
- another-post
- index.md
Written in Rust, can be run with Cargo
Install the command
bash
cargo install jekyll-to-gatsby
Run the command
cd my-folder-with-posts
cargo run
The new files should appear in the output
folder