diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-11-07 02:02:45 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-11-07 02:02:45 +0300 |
commit | e3a41da5a0a3d70ac53591f2b66144f2be2b3871 (patch) | |
tree | 789cc69b05f2447c11f04dbb6ae972ffa0acd1c9 /include/site.h | |
download | revela-e3a41da5a0a3d70ac53591f2b66144f2be2b3871.tar.gz revela-e3a41da5a0a3d70ac53591f2b66144f2be2b3871.zip |
Initial commit.
Almost functional but still missing features and lacking testing.
Diffstat (limited to 'include/site.h')
-rw-r--r-- | include/site.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/site.h b/include/site.h new file mode 100644 index 0000000..678cd47 --- /dev/null +++ b/include/site.h @@ -0,0 +1,46 @@ +#ifndef REVELA_SITE_H +#define REVELA_SITE_H + +#include "config.h" +#include "bstree.h" +#include "render.h" +#include "components.h" + +#include <wand/magick_wand.h> + +#ifndef SITE_DEFAULT_RESOURCES +#define SITE_DEFAULT_RESOURCES "/usr/share/revela" +#endif + +#define CSSDIR "css" +#define STATICDIR "static" +#define CONTENTDIR "content" +#define TEMPLATESDIR "templates" +#define DEFAULTALBUM "unorganized" + +struct site { + struct site_config *config; + MagickWand *wand; + char *root_dir; + const char *output_dir; + char *content_dir; + /* + * Indicates how many characters after the full root dir path of the input + * directory the relative path of the albums + the content dir start. See + * site_init() + */ + size_t rel_content_dir; + struct bstree *albums; + struct render render; + bool dry_run; +}; + +bool site_build(struct site *); + +bool site_load(struct site *); + +bool site_init(struct site *); + +void site_deinit(struct site *); + +#endif |