From bb3c510e070f67ce3e2247c3b0e9ea5a81fd41c1 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Tue, 28 Jul 2020 00:57:21 +0200 Subject: [PATCH] define markdown dir relative to content dir --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index 619e7fc..3895e10 100755 --- a/server.py +++ b/server.py @@ -192,7 +192,7 @@ def news(): # load article based on config # try: - with open(article[MARKDOWN_FILE_KEY]) as f: + with open(os.path.join(app.config["CONTENT_DIR"], article[MARKDOWN_FILE_KEY])) as f: article.update( { MARKDOWN_CONTENT_KEY : markdown2.markdown(f.read()) } ) except FileNotFoundError as e: return ("File not found Error ({})".format(e), HTTP_NOT_FOUND)