Skip to content

A "brush" for the Liquid (aka Shopify) templating language to use with the Wordpress Syntax Highlighter Evolved plugin

License

Notifications You must be signed in to change notification settings

ergophobe/syntaxhighlighter-liquid-brush

Repository files navigation

Liquid Brush for Syntax Highlighter Evolved Wordpress Plugin

Plugin Name: SyntaxHighlighter Evolved: Liquid Brush Description: Adds support for the Liquid language (Shopify's templating language) to the SyntaxHighlighter Evolved plugin. Author: Tom Lambert Version: 0.2 Author URI: http://raisedbyturtles.org/ License: GPLv2

This plugin is only an extension of the SyntaxHighlighter Evolved which has to be installed and activated.

The brush file is a first pass and needs more work to be a quality Liquid highlighter. In particular it needs comment support.

Installation

  1. First install SyntaxHighlighter Evolved
  2. Then install this plugin

Known Issues

If you are using any plugin that minimizes Javascript, such as Frank Goossens' excellent Autoptimize, you must exclude some of the Syntax Highlighter Evolved Javascript files from getting minified. As explained by Alex Mills this is because of the base library and is not something that I can fix for my plugin or he can fix for Syntax Highlighter Evolved without changing out the base library.

In Autoptimize specifically, you would do this:

  • Under "Javascript Options" in the field labelled "Exclude scripts from Autoptimize" you must add: shBrushLiquid.js,shBrushLiquid.min.js,syntaxhighlighter.js
  • Under "Misc Options" you must uncheck "Minify excluded CSS and JS files?"

For more detail, see my blog post for the first generation of this plugin.

To Do

  • add support for Liquid comments
  • check for dependencies. WP does nothing to manage dependencies and provides no dependency management. One solution is Waclaw Jacek's Check Plugin Dependencies

Changelog

= 0.2 = Minifiy JS

= 0.1 = Experimental first version

About

A "brush" for the Liquid (aka Shopify) templating language to use with the Wordpress Syntax Highlighter Evolved plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published