Skip to content

Commit 94fbe36

Browse files
committed
fix: clear and add post category to hash
1 parent 8724844 commit 94fbe36

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/resources/projects/website/listing/quarto-listing.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ const kDefaultCategory = ""; // Default category "" means all posts selected
66
window.quartoListingCategory = (category) => {
77
// category is URI encoded in EJS template for UTF-8 support
88
category = decodeURIComponent(atob(category));
9-
if (categoriesLoaded) {
10-
activateCategory(category);
11-
setCategoryHash();
12-
}
9+
selectedCategories.clear();
10+
selectedCategories.add(category);
11+
updateCategoryUI();
12+
filterListingCategory();
13+
setCategoryHash();
1314
};
1415

1516
window["quarto-listing-loaded"] = () => {

0 commit comments

Comments
 (0)