Closed hedgecrw closed 3 months ago
Thank you for the report! I will need to do some more digging, but my hunch is that this is really a bug. The file seems to be generated, only docs.rs doesn't correctly serve it.
I'll try your build locally with a fix and see if it works then.
I have a Rust repo at https://github.com/hedgetechllc/musicxml that contains a Rust workspace and 3 sub-projects. To build the docs for the main project (musicxml) to include the contents of a custom CSS file at
musicxml/assets/docs.css
, I can either run from either the root workspace directory or themusicxml
directory:RUSTDOCFLAGS="--extend-css musicxml/assets/docs.css" cargo doc --no-deps
And everything works fine.
I added the following to the
Cargo.toml
file in themusicxml
directory so that docs.rs would pass the appropriate RUSTDOCFLAGS when building:However, this resulted in a build error on docs.rs about
musicxml/assets/docs.css
not existing. I figured this was probably because the full workspace wasn't being passed to docs.rs and just themusicxml
project itself, so I updated theCargo.toml
file to read:...and this caused the docs to build without problem on docs.rs; however, the CSS changes still weren't showing in the docs, and upon inspecting the source code, I can see that the CSS stylesheet is being added as:
...referencing a parent directory
..
that doesn't seem to exist on docs.rs. Is this a bug, or am I somehow using the wrong--extend-css
flag to get this CSS file to populate correctly. I do a similar manual process on GitHub, and the docs generate just fine there. Thanks!