You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have successfully generated documentation and I want to add offline search to it. After adding lunr_search = {'fuzziness': 1, 'index_docstrings': True} to my config.mako it works fine when opened using index.html inside the module subdirectory. However, when I serve the documentation on Netlify or even locally using serve the iframe for the search results point to a file inside a parent directory resulting in a 404 page.
Actual Behavior
Search should work for documentation out of the box.
Steps to Reproduce
Generate documentation for the module: pdoc --html --output-dir api_docs --template-dir pdoc/templates hub
Serve generated documentation from inside api_docs/hub
Search for anything
Additional info
The problem here is obviously that doc-search.html resides above the served site. How can this problem be solved?
pdoc version: 0.9.2
The text was updated successfully, but these errors were encountered:
I'm also having this issue, which seems to have been introduced in version 0.9.2. Prior to that, the search resources were placed in the module subdirectory, but now they are placed in the docs/ directory. This is a problem if you a serving the website from docs/module/ because higher-level resources will not be publicly accessible.
Not sure what the appropriate behavior should be — I presume there was a good reason why the search resources were moved up one level. Seems to be related to #250 and 2e08bd8
Expected Behavior
I have successfully generated documentation and I want to add offline search to it. After adding
lunr_search = {'fuzziness': 1, 'index_docstrings': True}
to myconfig.mako
it works fine when opened usingindex.html
inside the module subdirectory. However, when I serve the documentation on Netlify or even locally usingserve
theiframe
for the search results point to a file inside a parent directory resulting in a404
page.Actual Behavior
Search should work for documentation out of the box.
Steps to Reproduce
pdoc --html --output-dir api_docs --template-dir pdoc/templates hub
api_docs/hub
Additional info
The problem here is obviously that
doc-search.html
resides above the served site. How can this problem be solved?The text was updated successfully, but these errors were encountered: