Slashdot Mirror


Best Weblog Application for Posting Source Code?

BrewerDude asks: "I've set up a blog about programming (URL withheld: this isn't about self-promotion). I'm currently using one of the popular blog hosting services, but find it lacking when it comes to handling source code snippets in posts. It's even worse when it comes to dealing with code snippets that people include in their comments. At this point I'm frustrated enough that I'm ready to move from that service to something else. Ideally, I'm looking for something that will handle syntax highlighting for a variety of languages and do this for both the posts and the comments. I'd prefer a hosted solution, but am not opposed to installing and maintaining my own instance of a blog application if necessary. What have you found to be the best blog application when it comes to supporting posts and comments that include source code?"

7 of 75 comments (clear)

  1. DokuWiki by bigpresh · · Score: 5, Informative

    It's not a blog service/package per se (although there are some blogging-type plugins for it) but I find DokuWiki to be excellent at handling code snippets with decent syntax highlighting, and easy to use.

    An example bit of code can be done as easily as:

    <code perl>
    # some code here
    </code>

  2. Ikiwiki + source code coloring from Trac by halfnerd · · Score: 3, Informative

    Ikiwiki ( http://ikiwiki.kitenet.net/ ) is a really extendable wiki/blog-software and you could write a plugin in the style of Trac's Syntax Coloring support ( http://trac.edgewall.org/wiki/TracSyntaxColoring )

  3. JavaScript syntax highlighting by bigHairyDog · · Score: 3, Informative

    Dean Edwards' javascript syntax highlighter handles several languages (you can easily add your own) and operates via DHTML behaviors so you don't even need to include the script files in the page. It works in most browsers.

    http://dean.edwards.name/my/examples/star-light/

    What you need to use it is a blog that will let you post files to the server or create your own custom HTML templates, and then let people post HTML code. Code wrapped in <pre class="javascript"> gets highlighted correctly.

    If you can't post files, a bit of hacking around with the source code and you can embed it in a template and invoke it manually with javascript.

    Wordpress lets you post your own HTML templates with script - either install it on your own server or go for their free hosted service at wordpress.com.

    --

    foo mane padme hum

  4. You *are* a programmer by Kawahee · · Score: 3, Funny

    You know, as a programmer, you could write it yourself...

    --
    I'll subscribe to Slashdot when I see a month without a dupe, a typo, or an article the "editors" didn't read.
  5. Syntax highlighter by ricardo_nz · · Score: 3, Informative

    Not sure about a decent blog... but for highlighting code, geshi does a nice job.

  6. Re:use slashcode by quigonn · · Score: 3, Insightful

    I gues you wanted to use one of the actually allowed signatures of the main function:

    int main(void) { }
    int main(int argc, char * argv[]) { }

    --
    A monkey is doing the real work for me.
  7. You want Drupal + appropriate filter by yelvington · · Score: 3, Informative

    Drupal and the codefilter module will do a good job of supporting basic code entry in any arbitrary language. If you want robust support for highlighting for multiple languages, take a look at GeSHIFilter.

    http://drupal.org/
    http://drupal.org/project/codefilter
    GeSHIFilter: http://drupal.org/node/65961 and demo: http://www.ubisum.com/node/27