This commit is contained in:
Anish Lakhwara 2022-07-11 13:35:57 +10:00
parent 259a514ce9
commit 9c4e0510b0

View file

@ -135,7 +135,7 @@ def generate_html_pages(site_folder, entries, template, sub_pages_list, template
# Checking if content folder exists # Checking if content folder exists
folderExists = os.path.exists(site_folder + entry['folder']) folderExists = os.path.exists(site_folder + entry['folder'])
# If not, create it # If not, create it
if config.flat_build == False: if config.flat_build:
if not folderExists: if not folderExists:
os.mkdir(site_folder + entry['folder']) os.mkdir(site_folder + entry['folder'])
@ -192,9 +192,8 @@ def style_iframes(page):
page = page.replace(match, iframe) page = page.replace(match, iframe)
return page return page
# Get a list of the tags in the page # Get a list of the tags in the page
def get_tags(page): def get_tags(page):
regex = r":[a-zA-Z:]*:" regex = r":[a-zA-Z:]*:"
matches = re.finditer(regex, page, re.MULTILINE) matches = re.finditer(regex, page, re.MULTILINE)
@ -471,7 +470,7 @@ def clean_path(path):
path_items["iso_date"] = str(last_edit_iso) path_items["iso_date"] = str(last_edit_iso)
if config.flat_build == False: if config.flat_build:
path_items["slug"] = path_items["folder"] + "/" + path_items["slug"] path_items["slug"] = path_items["folder"] + "/" + path_items["slug"]
# TODO weird special case # TODO weird special case