Codeblock
With this plugin you can write blocks of code directly in your posts and optionally add titles and links.
Syntax
{% codeblock [title] [url] [link text] %}
Example 1
{% codeblock %}
Awesome code snippet
{% endcodeblock %}
Awesome code snippet
Example 2
# Including a file extension in the title enables highlighting
{% codeblock Time to be Awesome - awesome.rb %}
puts "Awesome!" unless lame
{% endcodeblock %}
1
|
|
Example 3
# Add an optional URL to enable downloading or linking to source
{% codeblock Got pain? painreleif.sh http://example.com/painreleief.sh Download it! %}
$ rm -rf ~/PAIN
{% endcodeblock %}
1 2 |
|
The last argument link_text
is optional. You may want to link to a source for download file, or documentation on some other site.