Markdown Post Creator
05 May, 2019 - 2 min read
This Sunday I had the idea to create a little tool to help me create my blog posts. I write my posts in Bear which is a beautiful MacOS and iOS app and then adding the frontmatter details by copy & paste from an old post. I really didn’t like that workflow so I decided to write this tool. Now I can fill out the details and paste my post content into the text-area click submit and get the publish-ready Markdown file.
I published the code on Github so that anyone can use it.
You can find it at GitHub - niklasmtj/postcreator
The handling is not that difficult. Since this is just a simple NodeJS server start it with:
The server starts and can be visited at
localhost:3000. There you will find a web interface which includes inputs for /title, date, path and content/. After filling the inputs and clicking the submit button the server will create a new Markdown file in the
/posts directory. Now you’re ready to copy the file to your blog post directory and publish it.
This is just a minimum in function and design. I will try to make it more flexible in the future to add and remove new frontmatter details fields. And the design will definitely get more love in the future.
PS: It works. This is the first post with the new workflow.
Thank you for reading,