Repository navigation
The Plugin API. - #1223
The Plugin API.#1223
Conversation
|
I've only skimmed it quickly - overall it looks good, I really like the direction. |
Yes. Half of the remaining open tickets are regarding search. It would be easier to start over. If users really want the old plugin, then they can fall back to it. However, if it makes sense after we have the new plugin, we can always get ride of |
a11b061 to
ae66eac
Compare
See the included documentation for a full explaination of the API.
Search has been removed and wrapped in a plugin (named "legacy_search").
The search feature was ported as-is. None of the open issues with search
have been addressed. Presumably, a new search plugin will be built from
the ground up which addresses those issues.
Note that there is no 'default' plugins. That means that users get no
search unless they enable it in the config by adding the following to
their `mkdocs.yml` file:
plugins:
- legacy_search
Fixes mkdocs#206
|
While working through some failing tests, The linkchecker tests made me realize that there is something missing from the API. In those tests we run through the integration tests and then run the linkchecker on the built sites. Because those sites are built without the Search Plugin, the search assets are not included in the build, causing the build to fail. I could just include the plugin in each config file, but that doesn't address that issue that the template still includes script tags pointing to the search assets regardless of whether the plugin is activated. In other words, we need a way for plugins to load scripts. We can't use |
|
So The real problem is that the legacy search script depends on require.js so rather than a straightforward script tag pointing to |
This is a hack which will get removed when the search plugin gets refactored. At that time we can remove the special case in the templates and do everything through the (no comments out) code in the plugin. Addresses issue raised in comments in mkdocs#1223.
|
Well the workaround was surprisingly easy. And it serves as a demonstration of how a theme could conditionally support a plugin (based on whether it is installed or not). I included the (commented out) code that uses This passes all tests now and is ready to merge. However, I'll let it sit for a few days to give others a chance to provide feedback. |
|
Just pushed a better fix which ever so slightly refactors |
|
Woop! Great job. |
See the included documentation for a full explanation of the API.
Search has been removed and wrapped in a plugin (named "legacy_search").
The search feature was ported as-is. None of the open issues with search
have been addressed. Presumably, a new search plugin will be built from
the ground up which addresses those issues.
Note that there is no 'default' plugins. That means that users get no
search unless they enable it in the config by adding the following to
their `mkdocs.yml` file:
plugins:
- legacy_search
Fixes mkdocs#206
See the included documentation for a full explanation of the API.
Search has been removed and wrapped in a plugin (named "legacy_search").
The search feature was ported as-is. None of the open issues with search
have been addressed. Presumably, a new search plugin will be built from
the ground up which addresses those issues.
Note that there is no 'default' plugins. That means that users get no
search unless they enable it in the config by adding the following to
their `mkdocs.yml` file:
plugins:
- legacy_search
Fixes mkdocs#206
See the included documentation for a full explanation of the API.
Search has been removed and wrapped in a plugin (named "legacy_search").
The search feature was ported as-is. None of the open issues with search
have been addressed. Presumably, a new search plugin will be built from
the ground up which addresses those issues.
Note that there is no 'default' plugins. That means that users get no
search unless they enable it in the config by adding the following to
their `mkdocs.yml` file:
plugins:
- legacy_search
Fixes mkdocs#206
See the included documentation for a full explanation of the API.
Search has been removed and wrapped in a plugin (named "legacy_search").
The search feature was ported as-is. None of the open issues with search
have been addressed. Presumably, a new search plugin will be built from
the ground up which addresses those issues.
Note that there is no 'default' plugins. That means that users get no
search unless they enable it in the config by adding the following to
their `mkdocs.yml` file:
plugins:
- legacy_search
Fixes mkdocs#206
See the included documentation for a full explanation of the API.
Search has been removed and wrapped in a plugin (named "legacy_search").
The search feature was ported as-is. None of the open issues with search
have been addressed. Presumably, a new search plugin will be built from
the ground up which addresses those issues.
Note that there is no 'default' plugins. That means that users get no
search unless they enable it in the config by adding the following to
their `mkdocs.yml` file:
plugins:
- legacy_search
Fixes #206
See the included documentation for a full explaination of the API.
Search has been removed and wrapped in a plugin (named "legacy_search").
The search feature was ported as-is. None of the open issues with search
have been addressed. Presumably, a new search plugin will be built from
the ground up which addresses those issues.
Note that there is no 'default' plugins. That means that users get no
search unless they enable it in the config by adding the following to
their
mkdocs.ymlfile:Fixes #206