quarto-dev / quarto-dev/quarto-cli
Add a class that excludes blocks of text from being added to the OOTB Quarto search index (search.json)
@cscheid is already working on this.
Since Apr 4, 2025.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Our use case:
We have several {{< embed >}} blocks across our documentation, some of which reference the outputs of running the tree command on certain folders. The tree output contains a bunch of names and terms that are used frequently across different areas of our product. If we happen to search for one of the terms that matches a directory of the tree output, we get a bunch of irrelevant results. For example, let's say I search for enumerations:
The page includes references to an enumerations folder, but the page itself isn't about enumerations.
I'd like the ability to add a class to a div or a span block and have Quarto strip that block out before it enters search.json.
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.
Assessment
This issue has not been assessed yet.