diff --git a/lexipython/build.py b/lexipython/build.py index 9c15023..b18bad5 100644 --- a/lexipython/build.py +++ b/lexipython/build.py @@ -435,13 +435,24 @@ def build_all(path_prefix, lexicon_name): os.remove(pathto("article", filename)) print("Writing article pages...") l = len(articles) + from jinja2 import Environment, FileSystemLoader, select_autoescape + env = Environment(loader=FileSystemLoader('lexipython/templates'), autoescape=select_autoescape(['html'])) + template = env.get_template("page-skeleton.html") for idx in range(l): article = articles[idx] with open(pathto("article", article.title_filesafe + ".html"), "w", encoding="utf-8", newline='') as f: content = article.build_default_content() - article_html = page.format( - title = article.title, - content = content) + #article_html = page.format( + # title = article.title, + # content = content) + tmp = { + "lexicon": "lexicon", + "prompt": "prompt", + "title": "title", + "sidebar_rows": ["hello", "world"], + "contentblocks": ["
{{prompt}}
+