Using Markdown in CakePHP

Posted July 10th, 2011 • 1 min read

Markdown rocks. I lately fell in love with it when I was setting up this very blog. You can just write easy-to-read and easy-to-write plain text files, and Markdown takes care of the rest.

For this blog I had used a Markdown script I found that parses plain text and outputs it as HTML. It allows me to write posts in a simple/plain format and just pump it into the database as is. For a while I wanted to make it into a more solid CakePHP Helper. And today I did. Setting it up couldn't be simpler, and using it is a matter of adding it as a call in your views.

I put it on Github @ Markdown for CakePHP along with the necessary instructions and usage example.

Hope you enjoy it, and if you have any suggestions or tips, don't hesitate to leave a comment or Fork it.

Stay up to date

Want to know when a new post comes out and stay in the loop on tips, tricks and gotchas? Consider signing up for the Mindthecode newsletter.

Comments

Keep reading

December 29th, 2013 • 5 min read
I will explain how to use environment variables in your Angular app
December 8th, 2013 • 1 min read
My experience while rebuilding this blog with CabinJS and Grunt
April 11th, 2011 • 2 min read
I'd like to use my first post to describe how I set up new projects in a simple way that works best for me.