The Coding Mant.is

Smashing Through Code

Today I Learned: I can use Markdown on my blog — 3-December-2014

Today I Learned: I can use Markdown on my blog

I really wanted to use Markdown on my blog – especially since I’ve been using it more and more for work documents, GitHub, the company blog, etc. I did a quick Google search and lo – I can! To enable Markdown for posts go to Settings -> Writing -> Markdown and check the “Use Markdown for posts and pages” checkbox. Similarly for comments, go to Settings -> Discussions -> Markdown and check the “Use Markdown for comments” checkbox.

Although I initially didn’t see the benefit of Markdown, after all it’s just “dumbed down HTML, right?” I really have to admit that I’ve gained a serious appreciation for it. It just adds so much speed to use special characters instead of opening and closing HTML tags all the time. For example, I can do either of the following for an H1 header:

<h1>Header</h1>

OR

#Header

Then there is adding snippets of code and bash. Since I have a serious focus in that area, and that focus will only grow over time, it is kind of a pain to use code tags – even WordPress’ code tags that allow you specify a language for syntax highlighting.

As another example, I get this:

print "Hello, World!\n"

By typing out either this:

[code language="ruby"]
print "Hello, World!\n"
[/code]

Or this:

```ruby
print "Hello, World!\n"
```

The latter of which appears to essentially be GitHub flavored Markdown. Although it seems pretty trivial, for the syntax highlighting that’s not actually HTML that’s being used. So I can remember a non-standard set of tags for syntax highlighting OR I can use what I use with GitHub (and thus have already memorized) anyway.

Anyway, Markdown doesn’t really need me to sing its praises – I’m just happy I can use it!

Design a site like this with WordPress.com
Get started