Tagged: wordpress Toggle Comment Threads | Keyboard Shortcuts

  • danielsaidi 2:10 pm on May 4, 2012 Permalink | Reply
    Tags: code, source code, wordpress   

    Posting source code on a WordPress hosted blog 

    As you probably have noticed, this is a blog about code…mostly. I post a lot of code here…but the code parts of the blog have been terribly formatted.

    The reason to this is that I host my blog at wordpress.com. This means that I serve under some limitations, such as only getting to select from a couple of themes (actually, there are tons of themes to choose from), not being able to add my own plugins etc. So, when it comes to code, I have not found a plugin that could be used to handle the code formatting. To make the code stand out, I have instead wrapped the code in pre tags and highlighted the code with a distinct color, but I have disliked that approach a lot.

    A couple of weeks ago, however, I found this blog post by the WordPress team themselves. Turns out that posting source code and getting it to format correctly is a walk in the park, using the sourcecode markup.

    By wrapping your code inside a:

    [code language=”css”]
    your code here

    WordPress will format the source code correctly. There are a number of language formats to choose from, such as C#, Java, JavaScript, Python, CSS, XML etc. etc. etc. See the original blog post for examples.

    Thanks, WordPress!

  • danielsaidi 11:24 pm on September 23, 2009 Permalink | Reply
    Tags: , , scribefire, wordpress   

    Testing ScribeFire 

    So, here I am, testing the ScribeFire plugin for Firefox. Let’s see how this post turns out.

    Header 1

    Header 2

    Bold text
    Italic text
    Underlined text
    Striked-out text
    Larger text
    Smaller text
    Red text
    « (special character)

    Image from my computer

    Image already on the web

    MoE – Motion Capture Biped Demo

    Code block (I will add CSS to skin these later on)


    • Unordered list
    • Unordered list
    1. Ordered list
    2. Ordered list
Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc