document.addEventListener("DOMContentLoaded", function () { const blogPostSlug = "/blog2"; // where blog posts live const blogCollectionUrl = "/blog2"; // where category filtering actually works if (window.location.pathname.startsWith(blogPostSlug + "/")) { const blogNav = document.createElement("div"); blogNav.innerHTML = ` `; const categorySection = document.querySelector('.blog-meta-item.blog-meta-item--categories'); if (categorySection) { categorySection.insertAdjacentElement("beforebegin", blogNav); } } });