fix paths

This commit is contained in:
cellarspoon
2021-12-15 12:05:44 +01:00
parent 55050aa3f6
commit 30dbc6212f
4 changed files with 15 additions and 18 deletions

View File

@ -192,18 +192,15 @@ if not os.path.exists("etags"):
os.mkdir("etags")
env = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.curdir))
template_dir = os.path.join(Path(__file__).parent.resolve(), "templates")
env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir))
output_dir = os.environ.get(
"OUTPUT_DIR", "/home/r/Programming/lumbung.space/lumbung.space-web/content/posts/"
)
# output_dir = os.environ.get('OUTPUT_DIR', 'network/')
output_dir = os.environ.get("OUTPUT_DIR")
if not os.path.exists(output_dir):
os.makedirs(output_dir)
cwd = Path.resolve()
template = env.get_template(os.path.join(cwd, "templates" "feed.md"))
template = env.get_template("feed.md")
# add iframe to the allowlist of feedparser's sanitizer,
# this is now handled in parse_post()