Dmitry Belitsky

Web design, development, photography… and a happy life.

{  CSS   Design   HTML   jQuery   PHP   RadiantCMS   SilverStripe   Wordpress   }

14th December 2009

Rack:Tidy with RadiantCMS

Optimising rendered html

While working on RadiantCMS based site, i start searching for tool, which will let me optimize html output, rendered by CMS.

Sean Cribbs give me good advice on IRC — Rack Middleware — Rack::Tidy.

Installation

You can follow installation steps from coderack entry page.

Adding to RadiantCMS installation

TIDY_LIB = '/usr/lib/libtidy-0.99.so.0'
require 'rack/tidy'

I used only two non-default option:

config.middleware.use Rack::Tidy,
  :ignore_paths => ['/admin'],
  :indent => false

Problems

I get problem with running this setup on my ubuntu vps, i get segmentation fault from tidybuffer.

Found simple patch on rubyforge.

Do you know other simple and useful Rack middleware solutions?

Let me know if so.

blog comments powered by Disqus