1- ## splat
1+ # 📷 splat
22
33![ Rust] ( https://github.com/matze/splat/workflows/Rust/badge.svg )
44
5- A simple [ sigal] ( https://github.com/saimn/sigal ) clone written in Rust.
5+ ** splat** is a command line application to generate static photo galleries from
6+ a source directory of image files. It is a spiritual cousin of
7+ [ sigal] ( https://github.com/saimn/sigal ) but written in Rust.
68
79<a href =" https://matze.github.io/splat/ " ><img alt =" Example output " src =" https://github.com/matze/splat/blob/master/example/screenshot.jpg " /></a >
810
911<p align =" center " ><strong ><a href =" https://matze.github.io/splat/ " >DEMO OUTPUT</a ></strong ></p >
1012
11- ### Usage
1213
13- splat is a command line application to generate static photo galleries from a
14- source directory of image files, a ` splat.toml ` configuration file and a theme
15- file containing an HTML template and optional assets.
14+ ## Usage
15+
16+ ** splat** is a command line application and besides a source directory of image
17+ files it requires a ` splat.toml ` configuration file and a theme file containing
18+ an HTML template as well as optional assets.
1619
1720To create an example configuration run ` splat new ` and edit ` splat.toml ` to your
1821liking, especially adapt the ` input ` and ` output ` paths. ` output ` will be
@@ -22,3 +25,29 @@ output.
2225> [ !IMPORTANT]
2326> The example theme relies on the Tailwind CSS v4.0 beta compiler. Make sure to
2427> install it if you want to use the theme.
28+
29+
30+ ## Templates
31+
32+ Templates must be written in [ tera
33+ syntax] ( https://keats.github.io/tera/docs/#templates ) . The following hierarchy
34+ of variables is available:
35+
36+ - ` collection `
37+ - ` title ` of this collection
38+ - ` breadcrumbs `
39+ - ` path ` to the corresponding page
40+ - ` title ` of the corresponding page
41+ - ` children ` of sub-collections
42+ - ` path ` to the collection
43+ - ` title ` of the collection
44+ - ` thumbnail ` of the collection
45+ - ` images ` for this collection
46+ - ` path ` to the image
47+ - ` width ` and ` height ` of the image
48+ - ` thumbnail ` of the image
49+
50+
51+ ## License
52+
53+ [ MIT] ( ./LICENSE )
0 commit comments