Closed torgeirl closed 9 months ago
I think we need to copy more of the files from katex/dist/ here: https://github.com/devilry/devilry-django/blob/a6ca80741edde46e4fe992060534546d13ad46c2/devilry/project/develop/settings/develop.py#L144-L148. Probably everything in the katex/dist/contrib/
and katex/dist/fonts/
directories (these are in the devilry/devilry_theme3/staticsources/devilry_theme3/node_modules/katex/dist/ directory).
Fixed in fd73b47.
Looking more into this I realize there are certain aspects with WhiteNoise's caching that would create issues when being served by multiple hosts behind a load balancer, and while it might still be beneficial to clean up file referencing in our static files we don't need it for this particular use-case.
Similar to Trix, WhiteNoise only works as a storage backend for static files without its caching behaviour enabled.
With caching enabled, building Devilry's static files will give
MissingFileError
:While the file that was reported missing with Trix did exist, it seems the
KaTeX_AMS-Regular.woff2
font actually is missing fromdevilry/devilry_theme3/static/devilry_theme3/6.0.0/scripts/katex/
.I believe this error occurs at the first missing file, and that there are possible more file missing before caching with WhiteNoise works.
Some troubleshooting notes can be found on in the WhiteNoise docs.