something

This commit is contained in:
Guy Godfroy 2020-12-08 17:03:59 +01:00
parent 9800b08204
commit a1217c872a
1 changed files with 5 additions and 4 deletions

View File

@ -149,9 +149,10 @@ for page_dict in config.custom_pages:
rel_path, filename = os.path.split(page_dict["name"]) rel_path, filename = os.path.split(page_dict["name"])
if rel_path: if rel_path:
os.makedirs(rel_path, exist_ok=True) os.makedirs(rel_path, exist_ok=True)
basename, extension = os.path.splitext(page_dict["name"]) basename, extension = os.path.splitext(filename)
if not extension: if extension = "":
extention = config.gmi_extension filename = basename + config.gmi_extension
else:
filename = basename + extension filename = basename + extension
filepath = os.path.join(rel_path, filename) filepath = os.path.join(rel_path, filename)
with open(tpl_path + "/" + page_dict.get("tpl", basename) + ".tpl", "r") as tpl: with open(tpl_path + "/" + page_dict.get("tpl", basename) + ".tpl", "r") as tpl: