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 ab363e52cc2d0a8e55f9660e0791389d87bed0a6..1936fdf698086257c4d3c97f732c05eca8084828 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(