aboutsummaryrefslogtreecommitdiff
path: root/include/site.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/site.h')
-rw-r--r--include/site.h46
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