From 62cf684af00a35b1bf86a82b61f4dc07dffbe646 Mon Sep 17 00:00:00 2001
From: Josh Borrow <joshua.borrow@durham.ac.uk>
Date: Thu, 17 Aug 2017 17:12:20 +0100
Subject: [PATCH] Moved compiler and about to the top level directory

---
 templates/about.py => about.py       |  0
 templates/compiler.py => compiler.py | 23 ++++++++++++++++++++---
 2 files changed, 20 insertions(+), 3 deletions(-)
 rename templates/about.py => about.py (100%)
 rename templates/compiler.py => compiler.py (88%)

diff --git a/templates/about.py b/about.py
similarity index 100%
rename from templates/about.py
rename to about.py
diff --git a/templates/compiler.py b/compiler.py
similarity index 88%
rename from templates/compiler.py
rename to compiler.py
index ab363e5..1936fdf 100644
--- a/templates/compiler.py
+++ b/compiler.py
@@ -5,6 +5,7 @@
 """
 
 import os
+from distutils.dir_util import copy_tree
 
 import jinja2
 import yaml
@@ -107,17 +108,33 @@ def render(render_pages, data_dir, template_dir, output_dir):
     return
 
 
+def copy_static(directories, output_dir):
+    """ Copies the (static) files from the original directory to the output """
+    if type(directories) == list:
+        for directory in directories: 
+            copy_tree(directory, output_dir)
+    else:
+        copy_tree(directories, output_dir)
+
+    return
+    
+
 if __name__ == "__main__":
     import about
 
-    DATA_DIR = "../data"
-    TEMPLATE_DIR = "."
+    DATA_DIR = "/data"
+    TEMPLATE_DIR = "./templates"
     OUTPUT_DIR = "./compiled"
 
     PAGES = [
         "index.html",
         "pubs.html",
-        "talks.html"
+        "talks.html",
+        "about.html"
+    ]
+
+    STATIC = [
+        "stylesheets"
     ]
 
     about.compile_to_yaml(
-- 
GitLab