Posting Code Question

What are people using this day to post code (and I mean good looking code) to their blogs these days? I've tried a lot of options without finding a good way of doing it, though I see a lot of people getting it done without issues, so I must be doing something wrong. Hopefully one of you can enlighten me as to how :)

Here are some options I've tried:

  • Copy from VS, paste into Word, paste from Word into your blog entry. I've used this one successfully on the past (though it's cumbersome) as long as I did my posting from IE (never could get it to work right with Firefox and of course it just plain doesn't work with Windows Live Writer), until a couple of days ago when it just stopped working right; no clue why.
  • Use a third party formatting tool, including: CopySourceAsHtml (which I haven't been able to get fully working with VS2005, btw), all the code-formatting Windows Live Writer plugins I've found and this. All of the seem to generate HTML that looks great on the browser, but, for some reason, the code turns to sh*t by the time it reaches my RSS aggregator.

So, any clues would sure be appreciated :-)

Comments (1)

MarcosSeptember 11th, 2006 at 6:40 am

Hi Tomas
I use a JavaScript class to highlight code examples:
http://www.dreamprojections.com/syntaxhighlighter
Is excellent because you only paste the code and don´t need to worry how it look, also has other options to show the line or columns numbers, etc.
Some examples
http://www.filehelpers.com/example_easy.html
http://www.filehelpers.com/example_progress.html
I was playing a bit with the CSS and I love it.
Cheers
Marcos

Leave a comment

Your comment