diff --git a/basant/build/kitaab.py b/basant/build/kitaab.py index 9b30c51..7b32647 100644 --- a/basant/build/kitaab.py +++ b/basant/build/kitaab.py @@ -135,7 +135,7 @@ def generate_html_pages(site_folder, entries, template, sub_pages_list, template # Checking if content folder exists folderExists = os.path.exists(site_folder + entry['folder']) # If not, create it - if config.flat_build == False: + if config.flat_build: if not folderExists: os.mkdir(site_folder + entry['folder']) @@ -162,7 +162,7 @@ def get_entry_title(page): # remove .wiki from the end of the file name textContent = page.split('/')[1][:-5] except FileNotFoundError: - #print(f"Page not found, but present in tags: {page}") + # print(f"Page not found, but present in tags: {page}") return None except UnicodeDecodeError: print(f"Page could not be read: {page}") @@ -192,9 +192,8 @@ def style_iframes(page): page = page.replace(match, iframe) return page + # Get a list of the tags in the page - - def get_tags(page): regex = r":[a-zA-Z:]*:" matches = re.finditer(regex, page, re.MULTILINE) @@ -471,7 +470,7 @@ def clean_path(path): 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"] # TODO weird special case