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

pdoc.render.configure(search=False) has no effect #354

Closed
abubelinha opened this issue Feb 19, 2022 · 1 comment
Closed

pdoc.render.configure(search=False) has no effect #354

abubelinha opened this issue Feb 19, 2022 · 1 comment
Labels

Comments

@abubelinha
Copy link

Problem Description

A clear and concise description of what the bug is.

Steps to reproduce the behavior:

  1. I ran this script (actually myscripts list is much longer):
import pdoc
myscripts = ["./myscript.py", "./path2/myscript.py", "myscript3.py"]
myoutput_path="./_mydocs"
# ... more code in the middle (see #327 example) but I don't think it's relevant to this issue
pdoc.render.configure(math=True)
pdoc.render.configure(search=False) # adding this line has no effect in my html output !!!
pdoc.render.configure(template_directory="_pdoc_custom_templates") # actually broken after issue #346
pdoc.pdoc(*myscripts, output_directory=Path(myoutput_path))
  1. Open documentation in Chrome (current version)
  2. Documentation still contains search bar and associated javascript code

System Information

pdoc: 10.0.1 (just for this test) and 8.3.0 (until I solve problems raised by #346)
Python: 3.8.7
Platform: Windows-7-6.1.7601-SP1

@mhils
Copy link
Member

mhils commented Feb 19, 2022

Instead of

pdoc.render.configure(math=True)
pdoc.render.configure(search=False)
pdoc.render.configure(template_directory="_pdoc_custom_templates")

you want to do

pdoc.render.configure(
    math=True,
    search=False,
    template_directory="_pdoc_custom_templates"
)

Otherwise you're overwriting math and search with the default values.

@mhils mhils closed this as completed Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants