Closed pchinery closed 2 years ago
Ok, I have found that one out now. The problem seems to be, that search
is a plugin that is enabled by default. But by specifying plugins, this is overridden. This works:
plugins:
- search
- with-pdf:
enabled_if_env: ENABLE_PDF_EXPORT
I'm using the latest
mkdocs-material
theme and I'm playing with the PDF export (I just got started with it, so I might have missed something).I have also set the
enabled_if_env
setting:Even when
ENABLE_PDF_EXPORT
is not set, the search bar is removed from the HTML when runningmkdocs serve
(I'll have to check formkdocs build
though). So I have to comment out the PDF export to make the search bar appear again.Am I doing something wrong here or is this a technical thing, e.g. because the search bar needs to be removed while rendering the PDF?