Posting source code

Apr 10, 2011·
Julio Batista Silva
Julio Batista Silva
· 1 min read

Wordpress

Before migrating to Octopress, I used Wordpress.
Many times I needed to post snippets of source code, it’s quite simple, just type:

[ sourcecode language="cpp" ]…[ /sourcecode ]

The result would be something like:

#include <iostream>
int main()
{
    cout << "Hello World" << endl;
    return 0;
}

If you have Wordpress installed on your server, first install the available plugin At this link.

More information

Octopress

{% codeblock Exemplo - exemplo.cpp %}
#include <iostream>
int main()
{
    cout << "Hello World" << endl;
    return 0;
}
{% endcodeblock %}

More information.

Julio Batista Silva
Authors
Senior Cloud Developer
comments powered by Disqus