From 62898ce86b10c632fb6f831b5508cde7369ab545 Mon Sep 17 00:00:00 2001 From: nathaniel smith Date: Sat, 23 Sep 2017 14:43:59 -0700 Subject: [PATCH] copy css files during compilation --- tildewiki/compilation.py | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/tildewiki/compilation.py b/tildewiki/compilation.py index 898934b..7b143ed 100644 --- a/tildewiki/compilation.py +++ b/tildewiki/compilation.py @@ -2,6 +2,7 @@ import os import re from datetime import datetime from os.path import join as path_join +from shutil import copyfile from markdown import markdown @@ -23,6 +24,8 @@ def compile_wiki(source_path: str, dest_path: str) -> None: header_content = compile_markdown(path_join(source_path, 'src/header.md')) footer_content = last_compiled + compile_markdown(path_join(source_path, 'src/footer.md')) + # TODO fix any links in header/footer to work with preview path + articles_root = path_join(source_path, 'src/articles') toc_content = '{}\n' with open(path_join(dest_path, 'toc.html'), 'w') as f: