Fork me on GitHub

Luminous - A PHP Syntax Highlighter

Latest release: 12th January 2013 - v0.7.0

Luminous is a PHP syntax highlighter.

Its main focus is on accuracy and quality of code highlighting, and modern features like CSS colour themes. Luminous is a generic highlighter which can highlight around 30 source code languages, and includes a built-in cache so you don't have to worry about your server load. If you want professional, high quality PHP syntax highlighting for your website or blog, give it a try.

You can try it out here as an online syntax highlighter, and download if it you want to deploy it on your own site.

News

RSS RSS

Current

12th January 2013 - Luminous 0.7.0 release

I finally got around to getting 0.7.0 out.

Highlights (pun):

  • SCSS (nested CSS) scanner
  • CSS and markup cleanup
  • Composer package
  • Licensing change, GPL => LGPL. In my eyes, using Luminous is akin to dynamic linking, and dynamic linking is okay by the GPL. But there is a certain amount of controversy around that. The LGPL is probably more appropriate in definite terms.

Download from the normal place.

Please note: the online demo will still use 0.6.7 for a while as I need to migrate the existing highlights to 0.7 (as the stylesheets are different).[...]

Read more

Archives

12th January 2013 - Luminous 0.7.0 release

I finally got around to getting 0.7.0 out.

Highlights (pun):

  • SCSS (nested CSS) scanner
  • CSS and markup cleanup
  • Composer package
  • Licensing change, GPL => LGPL. In my eyes, using Luminous is akin to dynamic linking, and dynamic linking is okay by the GPL. But there is a certain amount of controversy around that. The LGPL is probably more appropriate in definite terms.

Download from the normal place.

Please note: the online demo will still use 0.6.7 for a while as I need to migrate the existing highlights to 0.7 (as the stylesheets are different).[...]

Read more

Example/Demo

12345678910
<?php require_once('luminous/luminous.php'); ?>
<!DOCTYPE html>
<html>
  <head>
    <?= luminous::head_html(); // outputs stylesheet includes ?>
  </head>
  <body>
    <?= luminous::highlight('php', 'echo "hello world";'); ?>
  </body>
</html>