-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
feat(v2): siteMetadata #3042
Comments
I think it can be useful. The version information can also be included in all official plugins, and the debug plugin can help detect out-of-sync versions (e.g. core at alpha-58, theme-classic at alpha-56) |
Yes that's what I think too
For official plugins or not, I think we could do this in a generic way, to add plugin versions to this siteMetadata file:
The file could look like {
"docusaurusVersion": "2.0.0-alpha.58",
"siteVersion": "1.0.0",
"pluginVersions": {
"docusaurus-plugin-pwa": "2.0.0-alpha.58",
"custom-site-plugin": "1.0.0"
}
} I think we should use plugin name like Does someone want to work on this? |
Detecting existence of
There are no Therefore, I think all we can reliably do is to recursively walk up along the plugin resolved path until we hit a directory that contains Then there comes to the question of local plugins. I think it will almost always be the case that they share the same package.json with the root project. If we detect this is the case, we probably should just say it's local without giving a confusing version. I will probably try to work on it tomorrow. |
🚀 Feature
Currently, as far as I know, a site can't know which docusaurus version it is currently using
It would be useful to be able to get some metadata about the framework.
Algolia/DocSearch devs have expressed the need to be able to track which version of Docusaurus uses which version of DocSearch.
I think this does not belong to the site config: it is a new docusaurus context item that we should create.
For now we could keep it simple and just add the version, as it's been asked by Algolia.
This could be enhanced later, and include all plugins versions, the site version, and other useful things that we'd find useful.
We could also add these data to docusaurus-plugin-debug , @SamChou19815 do you think of additional data that could be useful to display?
The text was updated successfully, but these errors were encountered: