toolingcontent tools
MDX Generate Posts
A small CLI script to generate MDX posts from a given csv file, made for this website.
https://github.com/cameronolivier/mdx-generate-posts
Installation
At the moment, as this is not an NPM package just yet, you need to clone it from Github and run the npm run init
command to get it setup. See the Readme for more.
Usage
In your project directory in the terminal, run mkmdx
(make mdx) and it'll ask you for your CSV file and then where
you want to put the MDX files.
It'll look for a slug
field and use that as the slug if it exists. It'll add all the other fields to the
frontmatter automatically. I might extend it to set the 'body' of the mdx file outside of the frontmatter, but for now
it just sets everything in the frontmatter.