Code formatting in blog posts

Do you like posting source code samples on your blog?

I wasn’t sure how.  I just surrounded it with “<pre>” tags. That works in the basic sense. What about the syntax highlighting and line numbers?

A search of the WordPress FAQ’s revealed this how-to on posting code.

Basically it looks like this.  Just tell it what language you’re using.

It also revealed Google’s syntax highlighter for when Javascript libraries are doable.

Pretty simple. Thanks Google and Wordpress.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • E-mail this story to a friend!
  • LinkedIn
  • MySpace
  • Reddit
  • Slashdot
  • StumbleUpon
  • FriendFeed
  • Turn this article into a PDF!
  • Ping.fm
  • Twitter

Tags: , , , , ,

Leave a Reply