Contents Menu Expand Light mode Dark mode Auto light/dark mode
sphinx-basic-ng
sphinx-basic-ng
  • Goals
  • Expectations

Usage

  • Getting Started
  • Skeleton
  • Components
    • Breadcrumbs
    • “Edit this page” link
    • Ethical Ads
    • Site Logo
    • Related Pages
    • “Hide search matches” link
    • Search input
    • Sidebar Drawer Toggles
    • “View this page” link
  • Glossary

Project

  • Development
  • Design
  • Changelog
  • License
  • GitHub
Back to top

“Hide search matches” link#

Sphinx provides functionality to hide search matches, after the user lands on a page from search. This component exposes that to the user, allowing them to read the content once they’ve found it, without being distracted by the highlights.

Usage#

{% include "components/search-hide.html" %}
{% include "components/toggle-sidebar-secondary.html" %}

This will add a single empty div, with the id searchbox. When a page has highlights, Sphinx’s built-in search JS will inject the following HTML into this element:

<p class="highlight-link">
  <a href="javascript:Documentation.hideSearchWords()">Hide Search Matches</a>
</p>

Configurability#

None.

Next
Search input
Previous
Related Pages
Copyright © 2023, Pradyun Gedam
Made with Sphinx and @pradyunsg's Furo
On this page
  • “Hide search matches” link
    • Usage
    • Configurability