A few days ago I asked for suggestions: "Is there any tool to create static blog posts?" on how could I easily add blog-like content to an existing site. I was amazed by the awesome response from the community 💗and I thank all of you for your suggestions.
Although most of the suggestions were great, almost all were too complex for my needs. I didn't want to start using a 3rd party service to host my blog or to learn and add extra tools and build-steps that would still not allow me to easily create content.
I came up with a solution inspired by @haltakov (he suggested to simply write markdown and preview it in the code editor) and @robenkleene (he suggested to parse the markdown files directly in PHP, thus removing a build step).
I am really happy with the solution, it's really, really simple but it works very well for my use-case (integrate a blog into an existing PHP site).
The solution came by combining several suggestions received in the post mentioned above with some of my own ideas:
.mdfiles on the fly. I used Parsedown. This means that no database is needed, there is no build step and you can easily version posts using git.
.htaccessrewrites for nice blog post URLs.
You can see a usage demo here (the blog is integrated into an existing site).
I can now simply create new blog posts by simply writing a new
.md and I also have a nice preview while typing them.
Huge thanks to everyone for the great suggestions! I now just have to start creating the content! 😅