Skip to content

Commit

Permalink
docs: mention that search is only active for 2+ pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed Oct 17, 2023
1 parent 2126e60 commit 58df5c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pdoc/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"--search",
action=BooleanOptionalAction,
default=True,
help="Enable search functionality.",
help="Enable search functionality if multiple modules are documented.",
)
renderopts.add_argument(
"--show-source",
Expand Down
5 changes: 5 additions & 0 deletions pdoc/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
search box for the first time, pdoc will fetch the search index (`search.js`) and use that to
answer all upcoming queries.
##### Single-Page Documentation
If pdoc is documenting a single module only, search functionality will be disabled.
The browser's built-in search functionality will provide a better user experience in these cases.
##### Search Coverage
The search functionality covers all documented elements and their docstrings.
Expand Down

0 comments on commit 58df5c0

Please sign in to comment.