Find it attached to this message. The basic idea of the snapshot extension is to generate a local copy
all pages in Radiant’s database. This allows to deploy a complete site
static files to the web server, where it can be served statically by the
server (Apache…) without a running Radiant instance. It’s useful for
deployment of Radiant sites to cheap hosting servers where there isn’t
support. Also high traffic sites will benefit.
All this works if the rendered pages depend only on the state of the
at snapshot creation time. It won’t work on a blog site where users can
post comments, for example. Neither won’t work if “non deterministic”
are used, like and . Also care must be taken
the back_door extension. Well, in these cases the extension “will work”
the sense that the pages are generated, but obviously they will be
since they are “fixed” and don’t represent their “dynamic” version.
Although it looks quite a hard requirement, in practice most of the
sites generated by CMSs are “static” (think on most company sites). I
developed this extension for myself, i will use it in a few sites i’m
developing. It works like a charm in the sites i have tested it.
It will take me a few weeks to finalize the extension, but i publish
now so it can be tested and commented by everyone. Remains to be done:
documentation, usage examples ( Apache’s .htaccess, etc.), minor extra
functionality and general clean-up.
This extension comes from the ideas i commented in thread
USAGE (assuming the cwd is the root of the Radiant site
- install extension - execute "rake -T | grep snapshot" to see the taks and their
description (it’s controlled with Rake tasks)
- the default configuration should be correct for quick test, check
- if you need to update the configuration, run “rake
snapshot:create_config” and edit the file in “config/snapshot.yaml”
- execute “rake snapshot:create”, all the site will be dumped to
“snapshot/” (by default “production” database)
- execute “rake snapshot:serve” to start a local web server on
http://localhost:8080 where you can test the snapshot
Comments etc. welcomed. /AITOR