Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a class that excludes blocks of text from being added to the OOTB Quarto search index (search.json) #11189

Open
nickvigilante opened this issue Oct 24, 2024 · 3 comments · May be fixed by #11190
Labels
enhancement New feature or request search
Milestone

Comments

@nickvigilante
Copy link

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:

Image

The page includes references to an enumerations folder, but the page itself isn't about enumerations.

Image

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.

@cscheid cscheid added this to the Future milestone Oct 24, 2024
@cscheid cscheid added enhancement New feature or request search labels Oct 24, 2024
@mcanouil
Copy link
Collaborator

@cscheid
Copy link
Collaborator

cscheid commented Oct 24, 2024

If you can put together a PR against src/project/types/website/website-search.ts, we can iterate on it.

nickvigilante added a commit to nickvigilante/quarto-cli that referenced this issue Oct 24, 2024
nickvigilante added a commit to nickvigilante/quarto-cli that referenced this issue Oct 24, 2024
- Users will now be able to create `div`s and `span`s that exclude
certain page elements from the search index.
@cscheid cscheid modified the milestones: Future, v1.6 Oct 24, 2024
nickvigilante added a commit to nickvigilante/quarto-cli that referenced this issue Oct 24, 2024
- Users will now be able to create `div`s and `span`s that exclude
certain page elements from the search index.
nickvigilante added a commit to nickvigilante/quarto-cli that referenced this issue Oct 24, 2024
- Users will now be able to create `div`s and `span`s that exclude
certain page elements from the search index.
nickvigilante added a commit to nickvigilante/quarto-cli that referenced this issue Oct 24, 2024
- Users will now be able to create `div`s and `span`s that exclude
certain page elements from the search index.
nickvigilante added a commit to nickvigilante/quarto-cli that referenced this issue Oct 28, 2024
- Users will now be able to create `div`s and `span`s that exclude
certain page elements from the search index.
nickvigilante added a commit to nickvigilante/quarto-cli that referenced this issue Oct 28, 2024
- Users will now be able to create `div`s and `span`s that exclude
certain page elements from the search index.
@nickvigilante
Copy link
Author

@cscheid Thanks for the tip! I'm still working on the tests. It may take me a few days, since I have a few other higher-priority items, but I'll be sure to get this done as soon as I can. It seems like we already signed and sent over the contributor agreement for TileDB, and I just added a changelog note for 1.6.

nickvigilante added a commit to nickvigilante/quarto-cli that referenced this issue Oct 28, 2024
- Users will now be able to create `div`s and `span`s that exclude
certain page elements from the search index.
@cscheid cscheid modified the milestones: v1.6, v1.7 Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request search
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants