quarto-dev / quarto-dev/quarto-cli
Model algolia crumbs to allow hierarchical filtering
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Currently, quarto includes crumbs in the algolia search.json as an array. However, afaik algolia cannot filter by crumb level (e.g. filter on first crumb).
From this algolia issue, it looks like algolia expects an object to represent hierarachical structure:
- current:
crumbs: ["a", "b", "c"] - suggested:
crumbs: {"lvl0": "a", "lvl1": "b", "lvl2": "c"}
I'm happy to explore more what the hierarchical structure could give users. But I suspect it might make it easier to build out facets / filters based on crumbs. I wanted to raise early, though -- to get any quick impressions on this algolia approach. (I personally don't love things like "lvl0", but am loving algolia facetting!)
See the algolia docs on filtering
edit:
After more experimenting, I think algolia needs the crumb structure to be this:
- suggested:
crumbs: {"lvl0": "a", "lvl1": "a > b", "lvl2": "a > b > c"}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the code that generates Quarto's Algolia search.json and assembles the crumbs field. Compare the generated data with Algolia's hierarchical filtering expectations and the issue's final suggested structure. Done means search.json represents each crumb level cumulatively, from lvl0 through the available levels, and supports filtering by those levels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- search
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100