highlight_js is a very simple module that provides an easy integration in Drupal of the (awesome) highlight.js script developed by Ivan Sagalaev (http://softwaremaniacs.org/soft/highlight/en/).
There are already plenty of other solutions already available to highlight code in Drupal, however two main reasons motivated the creation of this module;
- highlight.js is very practical because completely unobtrusive, to the point that you don't need to specify the language of the code you embed; the script will detect it by itself. It is particularly useful when using the Markdown filter for example, which does not allow for specifying custom attributes.
- highlight.js has really straightforward and powerful theming capacities and awesome existing themes.
- Download the archive or clone the repository.
- Drop the highlight_js/ folder in your modules folders (sites/all/modules for example)
- Go to the modules pages (http://yoursite.com/admin/modules)
- Enable the hightlight.js module.
- Enjoy: from now on, any code you publish within
tags will be highlighted.
- hunvreus (Ronan Berder), from Wiredcraft (http://wiredcraft.com)