The eternal HTML vs Markdown vs Text dilemma
I’ve just been working on adding SVG images to How a Car Works.
As usual, I feel like I’m banging my head against the wall on the best way to store and edit the content of the articles. I’ve tried HTML, Markdown, HTML again with Redactor as the editor, now I’m finding once again that redactor is mangling my HTML source.
“Ahaa!”, I just thought, “I’ll store the articles as HTML files and then I can edit them in VIM or wherever I want.” But not being stored in the database means the articles won’t be searchable.
So now I’m thinking the optimal workflow might be to store all the articles as HTML files. And then each time a file changes, I repopulate the DB with a plaintext version. This allows me to put the articles in version control and to run batch jobs against them. They’d also be synched between my local machine and the production system - at the moment I don’t sync the two DBs.
I’m going to have a bath and think about it.