Add site map

This commit is contained in:
2025-06-15 15:41:17 +01:00
parent 3b96c59bcf
commit 4e860d14e6
9 changed files with 83 additions and 1 deletions

View File

@@ -45,7 +45,7 @@ def to_html(content: str) -> str:
''' Jninja filter to wrap markdown '''
return markdown(content)
def get_all_posts(directory: str) -> list:
def get_all_posts(directory: str = md_directory) -> list:
''' Get all posts in the posts directory '''
abs_paths = [path.join(directory, x) for x in glob(f'{directory}/*.md')]
return [frontmatter.load(x) for x in abs_paths]