Markdown seems to be easier to write and edit than HTML. All HTML editors I’ve seen output a ton of unnecessary junk. Markdown seems cleaner.
Here is what I’m thinking of doing: storing markdown in the database, converting it to HTML with PHP Markdown, then outputting that to the web browser.
One problem is that it would have to do this every time a page is requested. This seems somewhat expensive.
Is this a good idea? or is there a more efficient way to do this?
As a practical example, Stack Overflow supports Markdown (as you know), but stores both the Markdown and the rendered HTML in the database. This makes it much faster to serve pages, because the rendered HTML is always the same. Posts are created much less frequently than they are shown to users.