diff --git a/build.py b/build.py index ea06fab..b5ca299 100755 --- a/build.py +++ b/build.py @@ -64,6 +64,11 @@ def main(): article.append(page_content) page.article.replace_with(article) + # Rewrite links with markdown extensions + for a in page.css.select("a[href]"): + if a["href"].endswith(".md"): + a["href"] = a["href"][:-3] + ".html" + # Inject path into the nav for i in range(len(dirpath.parts)): a = page.new_tag("a")