diff options
Diffstat (limited to 'include/render.h')
-rw-r--r-- | include/render.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/render.h b/include/render.h new file mode 100644 index 0000000..faa6f73 --- /dev/null +++ b/include/render.h @@ -0,0 +1,38 @@ +#ifndef REVELA_RENDER_H +#define REVELA_RENDER_H + +#include <sys/stat.h> + +#include "bstree.h" +#include "config.h" +#include "template.h" +#include "components.h" + +struct render { + /* Unja environment */ + struct env *env; + /* List of years with albums in each year */ + struct vector *years; + /* List of albums */ + struct vector *albums; + /* Hashmap used for all templates */ + struct hashmap *common_vars; + /* Modification time for the templates dir */ + struct timespec modtime; + bool dry_run; +}; + +bool render_make_index(struct render *, const char *path); + +bool render_make_album(struct render *r, const char *path, + const struct album *album); + +bool render_make_image(struct render *r, const char *path, + const struct image *image); + +bool render_init(struct render *, const char *path, struct site_config *, + struct bstree *albums); + +void render_deinit(struct render *); + +#endif |