Closed JanPalasek closed 2 years ago
I'd like to add that I don't know how to specify the dictionary instead of the simple value for lunr_search in the command-line. It would be very nice to have it in docs.
doesn't take into account that the lunr_search might not be a dictionary.
Apparently, only a dictionary value is supported.
To specify a dictionary value on the command line, I believe something like this should work:
--config "lunr_search={}"
This would then use the defaults.
We don't check config variable types for correctness. The user might run into all sorts of similar issues if they pass invalid types. I guess that's a separate issue, and you're welcome to open a new enhancement proposal for it, hopefully accompanied by a PR.
lunr_search=
with --html
actually works.
Thanks, it works.
Actual Behavior
Expected Behavior
Correctly Exported.
Steps to Reproduce
pdoc3 --html -c lunr_search=True --output-dir=out/ src/
Additional info
Solution
I was able the search bar working by modifying
templates/config.mako
lunr_search line to the following:lunr_search = {'fuzziness': 1, 'index_docstrings': True}
The following command then produced a working html:
pdoc3 --html --output-dir=out/ src/python
I believe that command
lunr_config.get("index_docstrings", True)
doesn't take into account that the lunr_search might not be a dictionary.