Source

smak / README

Full commit
SMAK is another image gallery app for werc.
(by JGL.yiyus 2009)

It displays thumbnails of the image files in the
directory if no index file is found, and shows
previews of the images in synthetic urls of the
form path/img for the file path/img.jpg. The
preview preloads the next image, so it can be
stored on the client cache.

To enable SMAK, add:

	conf_enable_smak

to _werc/config in the dir with the image gallery.

Comments can be added to the preview image with
markdown syntax through the file path/_img.md for
the file path/img.jpg.

To configure SMAK to your taste, set these variables:

   - smak_extensions=(png jpg jpeg bmp gif)
   - smak_prev_width=420
   - smak_thumb_height=96

for further customizations, modify the tpl files.
You can copy the files preview.tpl and/or
thumbnails.tpl to _werc/smak/, so you don't have
to overwrite the originals. Different templates
can be used for different galleries.

SMAK uses the p9p tools to convert the images: bmp,
jpg, png and gif to read input files; resample and
topng to transform and write them.

The _werc directory has to be writable by the
web server. Thumbnails and preview png files will
be stored in _werc/smak/thumb and _werc/smak/prev.

FAQ:
- What is the meaning of SMAK?
  http://www.smak.be/