@OsmanWa Instead of static URLs i would recommend, using the query parameters to do the filtering during the querying itself. Something like -
/blogs?tag=tech&author=john&date=2025
The code would look like -
// In your block's JS
export default async function decorate(block) {
const urlParams = new URLSearchParams(window.location.search);
const tag = urlParams.get('tag');
const author = urlParams.get('author');
// Build query path with filters
let queryPath = '/query-index.json?limit=20';
if (tag) queryPath += `&tag=${tag}`;
if (author) queryPath += `&author=${author}`;
const data = await loadJSON(queryPath);
// Render your blogs with the data
}
This approach offers several advantages:
- Multiple filter parameters simultaneously
- Easy to bookmark and share
- SEO-friendly when implemented properly
- Doesn't require new page configurations for each tag