From e3a41da5a0a3d70ac53591f2b66144f2be2b3871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Sun, 7 Nov 2021 02:02:45 +0300 Subject: Initial commit. Almost functional but still missing features and lacking testing. --- include/render.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 include/render.h (limited to 'include/render.h') 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 + +#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 -- cgit v1.2.3