Skip to content

2026 04 27 issue 121

[2026-04-27] bugfix | Automate Blog Navigation Hook

  • Discovered that the "Most Recent Blog Posts" links in the sidebar navigation were failing to update dynamically.
  • Identified the root cause in docs/tools/blog_hook.py: The python script was attempting to manually construct absolute HTML paths (/blog/YYYY/MM/DD/slug/). MkDocs treats paths starting with / as external, completely bypassing its internal routing and failing to update the navigation accurately.
  • Refactored blog_hook.py to simply pass the internal Markdown paths (blog/posts/[filename].md) to the nav dictionary.
  • MkDocs Material now correctly intercepts these files, automatically converts them to their corresponding live URLs, and seamlessly updates the sidebar with the latest 3 posts on every site build.