Wednesday, September 7, 2011

Blogging and not blogging

It's been a month since I started working on this blog, and the only thing I have gotten up is my introductory post, which talks about all the other stuff I want to write. Not quite the start I wanted to get off to, admittedly, but August managed to be much busier than I would have thought, me lacking a job and all.

That said, I do have a bone to pick with Blogger. It's convenient, free, interfaces with all my stuff, but writing things that include code has been a real pain in the butt. I could inline it as a quote, but I don't get syntax highlighting. It seems I can modify my template to include plugins for syntax highlighting, but given that I would like these bits to be copy-pastable, including the actual code in the HTML seems like a recipe for trouble.

So I am currently using "gist" for my samples, and embedding them with script tags. This is nifty, certainly, but I'm guessing it doesn't come across well in RSS, and probably to aggregators like Planet Python (which is probably where you are reading this). Furthermore, if I'm already maintaining a github account to get the gists, and for the larger project work, it seems like it would be much more straightforward if I could embed snippets directly from github, so I could do my editing and testing in PyDev.

I'm sure I'm not the first person to run up against this, so we will see if my Planet Python syndication can bring any knowledgeable commentators my way. If you have any suggestions, especially ones where you can link to examples, that would be very much appreciated.

5 comments:

  1. Heh, I have the same complaint (http://www.boredomandlaziness.org/2011/02/posting-code-and-syntax-highlighting.html)

    I've bugged a few Googlers about it (suggesting the ability to edit posts with a markup syntax like ReStructured Text), but none of the Google people I know actually work for the Blogger team.

    ReplyDelete
  2. That certainly seems like an option, but what's out there that handles this situation better?

    ReplyDelete
  3. I use WordPress + the csh_geshi plugin. I know Doug Hellman uses some kind of hacked Sphinx for his.

    ReplyDelete
  4. It's really not too painful to edit your template and include a highlighter like http://alexgorbatchev.com/SyntaxHighlighter/. After about half an hour of poking and prodding I've got syntax highlighting working in Blogger. It's not seemless but it's also a pretty good syntax highlighter :-D

    ReplyDelete