Commit f354bf7d authored by berumuron's avatar berumuron
Browse files

imp: Don't consider folder in article slug

Articles needed to be under ./articles folder. They can now be under an
arbitrary subfolder (to order files), the slug is only based on the
filename (and not its path).
parent ecd43a7e
......@@ -175,11 +175,13 @@ def main():
# List files from ./articles
articles = []
for filename in dir_tree(articles_path):
slug, ext = os.path.splitext(filename)
filename_no_ext, ext = os.path.splitext(filename)
if ext != ".md":
# Don't consider files which are not Markdown
slug = os.path.basename(filename_no_ext)
# We read the article file and initialize an Article from it
article_filepath = os.path.join(articles_path, filename)
with open(article_filepath, "r") as article_file:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment