Posting source code

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
Julio Batista Silva
Data Engineer

I’m a computer engineer passionate about science, technology, photography, and languages. Currently working as a Data Engineer in Germany.

comments powered by Disqus