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
Right now the static directory from which resources are sourced is hardcoded as /static ... I would like to be able to source from both /static and another folder.
This will be useful to me because I have an npm module that has shared components between two of my docusaurus sites. I would like to put shared images and fonts there so that I don't have to update them individually on both of the sites and can just do it in one place
Pitch
This increases the maintainability of docusaurus sites that have shared code such as mine. Right now it is pretty tedious to have to update shared images in two places instead of one, especially given the rapid rate at which docs sites change.
I believe the changes necessary are in the configureWebpack call of plugin-content-docs/blog/pages, but I'm not 100% sure
The text was updated successfully, but these errors were encountered:
We even have the usecase for this in the Docusaurus site itself, as the blog markdown files are shared between the v1 and v2 websites, and we have to actually duplicate blog post assets in both sites:
In such case, it would have been simpler to just tell Docusarus 2 to use website-1.x/static/img as a secondary assets folder.
Let me know if you need help implementing this, as it might involve changes in multiple locations, including the mdx loader (remark/transformImage/index.js).
To dogfoog, you can directly use this feature on the Docusaurus 2 website mentioned above :)
That would be interesting to have an algo to detect when the image exist in multiple static folders, to avoid unwanted overrides
🚀 Feature
Right now the static directory from which resources are sourced is hardcoded as /static ... I would like to be able to source from both /static and another folder.
Have you read the Contributing Guidelines on issues?
Yes
Motivation
This will be useful to me because I have an npm module that has shared components between two of my docusaurus sites. I would like to put shared images and fonts there so that I don't have to update them individually on both of the sites and can just do it in one place
Pitch
This increases the maintainability of docusaurus sites that have shared code such as mine. Right now it is pretty tedious to have to update shared images in two places instead of one, especially given the rapid rate at which docs sites change.
I believe the changes necessary are in the configureWebpack call of plugin-content-docs/blog/pages, but I'm not 100% sure
The text was updated successfully, but these errors were encountered: