Skip to contentSkip to author details

Source code on blog entries - I wish there was a better way

Update: Jan 19, 2016: I found my answer. I have switched to using Ghost as my blogging engine. It has great source code capabilities.

I really wish there was a good way to post computer source code on a blog. I have a plugin that I use to format my source code, but WordPress mangles my code when I input it in the post editor. I’m not sure why, but even if I put it in pre tags (I can’t even get the less than and greater than characters to show correctly on this entry), it still encodes it in the database. So, when it goes to display it, it shows the encoded version, which is totally wrong.

Also, when I migrated my blog last month, it encoded the source code from ALL of my code posts and now they all look terrible.

I’ve used Github gists before, but they don’t display properly for readers who use my RSS feed.

Also, gists separate content from the source and they don’t transfer when migrating.

I’ve been tempted to dump everything and switch to using some other blog engine, but I don’t want to break my permalinks yet again (I’ve done it three times in the history of my blog).

However, avoiding improvements in my blog because I want to remain backwards compatible is like Windows being tied to its past.

I don’t think I have enough readers any more to really worry about being tied to permalinks.