1 (edited by vsbyte 07-02-2013 12:53:54)

Topic: Syntax highlight

Plugin for highlights syntax in code examples on blog. Automatically finds blocks of code, detects a language and highlights it.

The plugin knows 54 languages:
Common:
Bash
C#
C++
CSS
Diff
HTML, XML
HTTP
Ini
JSON
Java
JavaScript
PHP
Perl
Python
Ruby
SQL

Other:
1C
AVR Assembler
ActionScript
Apache
AppleScript
Axapta
Brainfuck
CMake
Clojure
CoffeeScript
D
DOS .bat
Delphi
Django
Erlang
Erlang REPL
GLSL
Go
Haskell
Lisp
Lua
MEL
Markdown
Matlab
Nginx
Objective C
Parser3
Python profile
R
RenderMan RIB
RenderMan RSL
Rust
Scala
Smalltalk
TeX
VBScript
VHDL
Vala

Installing:

Upload plugin and enable it in "Dashboard -> Manage plugins".
Open file "/themes/your_theme/templates/default.bit", find:

<!-- Plugin::Analytics -->
    <?php
        if( isset($plugins_by_name['analytics']) )
        {
            echo $plugins_by_name['analytics']->get_html();
        }
    ?>

and add after:

<!-- Plugin::Highlight -->
    <?php
        if( isset($plugins_by_name['syntax_highlight']) )
        {
            echo $plugins_by_name['syntax_highlight']->get_html();
        }
    ?>

That's it! Enjoy!

Download from Dropbox or use Github

2 (edited by jurgen 07-02-2013 02:43:19)

Re: Syntax highlight

Nice smile
This ZIP is reported as unsafe and cannot be downloaded via the download.php in IE.
Firefox is working.

Installed the plugin but PowerShell is missing I guess.

http://thecloudsite.net/blog/

Re: Syntax highlight

Work perfectly big_smile

But how to add settings like numbering or switch highlight themes?

Re: Syntax highlight

kapten.lufi wrote:

Work perfectly big_smile

But how to add settings like numbering or switch highlight themes?

This plugin does not support line numbers.

Re: Syntax highlight

I don't have

<!-- Plugin::Analytics -->
    <?php
        if( isset($plugins_by_name['analytics']) )
        {
            echo $plugins_by_name['analytics']->get_html();
        }
    ?>

sad

PHP - HTML - Bit of CSS & JS

Re: Syntax highlight

Plugin is not updated and does not work, will update soon.

Re: Syntax highlight

When update will come ?

PHP - HTML - Bit of CSS & JS

Re: Syntax highlight

This is gold! Please update it smile