1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/python import glob from jinja2 import Environment, PackageLoader, select_autoescape env = Environment( loader=FileSystemLoader('../site/templates'), autoescape=select_autoescape(['html', 'xml']) ) def build_file(fn): print(fn) def build_site(): for fn in glob.glob("../content/**/index.txt", recursive=True): build_file(fn)