||Utility for creating static websites using erb.
||2003-07-04 16:16:33 GMT
(Projects of this owner)
NOTE: erb must be installed (tested with erb-2.0.3).
erb-site can be used to run erb recursively over a
directory that contains both erb and non-erb files.
This is useful for creating static sites, for example.
Use erb-site to process a directory that contains
eRuby files (and other files)--your "source" directory.
You also need to provide a "build" directory path (it
doesn't need to exist, and in fact if it does exist,
it will be recursively DELETED before processing begins).
erb-site will crawl your source directory, and for each
file it encounters:
* with .!! extension (or with ".!!." in the filename)
Process using erb, and save the results to the
corresponding path in the build directory minus
the .!! extension (or minus the ".!!." in the
filename). You can use your own string in place
of "!!" by specifying the --watch option.
(Note that file.!!.txt, file.txt.!!, and file.!!
all match, but file!!.txt and file!! do not.)
* with .rb extension
Ignore completely. This allows you to keep helper
functions and modules in separate files without
worrying about them getting into your deployment.
* all other extensions
Copied to corresponding build directory with no
For example, if this is your directory tree:
And you ran this command:
erb-site.rb source build
Your build directory would end up like this: