template paths

This commit is contained in:
cellarspoon
2021-12-15 11:55:51 +01:00
parent c0dd9c51af
commit 3b56fca00e
4 changed files with 12 additions and 5 deletions

View File

@ -7,6 +7,7 @@ import os
import shutil
import time
from ast import literal_eval as make_tuple
from pathlib import Path
from urllib.parse import urlparse
import arrow
@ -201,7 +202,8 @@ output_dir = os.environ.get(
if not os.path.exists(output_dir):
os.makedirs(output_dir)
template = env.get_template("post_template.md")
cwd = Path.resolve()
template = env.get_template(os.path.join(cwd, "templates" "feed.md"))
# add iframe to the allowlist of feedparser's sanitizer,
# this is now handled in parse_post()