Plugin index

This plugin automatically stores a copy of your style sheet(s) as a static file. Static files are served several orders of magnitude faster than PHP files (200 times faster, in my own tests on a FastCGI-based server).

Post-installation steps:

  1. Activate the plugin.
  2. Create a directory for the static style sheet files in the root of your textpattern installation. You should make sure that PHP is able to write to that directory.
  3. Visit the advanced preferences and make sure the “Style directory” preference contains the directory you created in step 2. This path is always a relative path (to the directory of your root textpattern installation).
  4. Visit the style tab and save each of your style sheets again (saving creates the static file).
  5. Replace all occurrences of <txp:css /> with <txp:rvm_css />.

The <txp:rvm_css /> tag supplied by this plugin has the exact same attributes as the built-in <txp:css /> tag and can be used as a drop-in replacement.

Note: because not all characters are allowed in filenames, avoid using non-alphanumeric characters in style sheet names.

If you wish to use LESS syntax in your stylesheets, you need to do the following (this could be implemented as a plugin):

  1. Download the file (version 0.3.5 or higher) from the lessphp website and upload it to your website.
  2. Edit your config.php file and add this just below the ‘$txpcfg’ configuration lines: require '/path/to/';

Things you should know when using LESS syntax:

  1. Remember to save each style sheet anew each time you update the file.
  2. If your LESS code cannot be parsed, an error will be shown at the bottom of css admin tab and the static css file will not be updated.
  3. When specifying only the filename in an “@import ‘style.less’” statement, the plugin assumes it’s in the “Style directory”. Do not leave out the ‘.less’ extension!