Baby steps toward using Markdown and Emacs to blog (1)

As I started using Emacs + Weblogger to blog on wordpress, I began wondering how could I turn in HTML-enriched blogs. After some search, I found two posts online pretty interesting:

(1) Edward O’Connor’s post [Simple composition of HTML emails in Emacs using Markdown]

(2) Felix Sun’s post [Write your blog in Markdown with Emacs and post it directly to Google Blogger].

These two posts did not provide direct answer of how to use Emacs+Weblogger+Markdown to generate blogs in HTML, but seemed to point to a good direction. I just want to quickly jot down what I learned about Markdown, after reading briefly through [John Gruber’s Markdown home page ].

John Gruber’s Markdown is implemented with Perl, and I also found another [Python-based Markdown] . I did not go through the Python one, cause I consider knowing one of them should good enough for my purpose.

As mentioned by John Gruber, his Markdown is two things:

(1) a plain text formatting syntax; and

(2) a software tool, written in Perl, that converts the plain text formatting to HTML. See the Syntax page for details pertaining to Markdown’s formatting syntax.

The basic idea is to write your text file following a relatively simple format specified in Markdown, and then run the perl script Markdown on the text file to generate its HTML version.

If you have your Perl installed on your machine, using Markdown is rather straightforward. For example, to run the on a file called index.text:

perl --html4tags index.text

Then the output of the is the HTML version of the index.text file.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s