Posting Code Question

Link. September 10, 2006. Comments [1]. Posted in: Blogging | Tools

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 :-)



Monday, September 11, 2006 8:40:26 AM (SA Pacific Standard Time, UTC-05:00)
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
Comments are closed.

About

Tomas Restrepo is co-founder of devdeo. His interests include .NET, Connected Systems, PowerShell and, lately, dynamic programming languages. More...

email: tomas@winterdom.com
msn: tomasr@passport.com
twitter: tomas_restrepo

Technorati Profile

devdeo logo

View my profile on LinkedIn

MVP logo

Syndicate

Ads


Links

Categories

Statistics

Total Posts: 1006
This Year: 76
This Month: 7
This Week: 0
Comments: 771

Blogroll

Post Archive

Other

Copyright © 2002-2008, Tomas Restrepo.

Powered by: newtelligence dasBlog 1.9.7174.0

Sign In