Adding custom resources to the docker images, to enable use by all sites #7377
-
Hello Community I have a custom docker image created around mkdocs-material 9.3.2, that is used by multiple site's to do the build. To simplify site configuration, additional images & resources that are used by all sites, have been added into the I know this may not be the way mkdocs-material was envisioned to work, but it allowed common resources (images, js, favicon) to be centralized, and simply referenced by multiple sites. A point to note is that these resources are not available from an external web browser. Following an upgrade of mkdocs-material, this functionality has stopped working. The custom-assets folder is no longer available to the site, either in build or serve mode. Tracing the change back, this started with 9.4.0. Is this a bug in mkdocs-material? Or is there a better way (without hosting on a webserver) to achieve the same results? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @markwturnbull, https://github.com/squidfunk/mkdocs-material/tree/9.3.2/material mkdocs-material/pyproject.toml Lines 83 to 84 in d848c46 mkdocs-material/pyproject.toml Lines 83 to 84 in 8b44f1a |
Beta Was this translation helpful? Give feedback.
Hi @markwturnbull,
I'm not sure what are the files you have in the
custom-assets
directory, and how you're accessing them.But thanks for the pointer that it changed in 9.4.0.
In that version the theme entry point has changed.
Instead of the root of the
material
package the theme is inside thetemplates
directory/sub-package.https://github.com/squidfunk/mkdocs-material/tree/9.3.2/material
https://github.com/squidfunk/mkdocs-material/tree/9.4.0/material
mkdocs-material/pyproject.toml
Lines 83 to 84 in d848c46
mkdocs-material/pyproject.toml
Lines 83 to 84 in 8b44f1a