Hello, my name is

Dmitry Belitsky

I do web development and live happy life with my family.

Rack:Tidy with RadiantCMS. Back to articles list

Optimizing 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.

-->