-
Notifications
You must be signed in to change notification settings - Fork 709
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
Fix Mermaid diagram rendering #3875
Conversation
But this will still fail on docs.rs? We should think on how to fix this there as well. Setting RUSTDOCFLAGS is also possible: https://github.com/rust-lang/docs.rs/blob/8b19841b449244d79976c29ae24534af3d7e8c82/templates/core/Cargo.toml.example#L42 |
Would we need to set RUSTDOCFLAGS and include the after script in every crate? Maybe it's easier to open an issue downstream in the |
So this pr doesn't break crates.io and we can merge it I'm going to restore the |
fwiw we have generally broader issues with docs.rs, especially with publishing It might then therefore be a better tradeoff to say for now we only focus on self-hosted rust docs. |
Confirmed fixed in prod 🥳 https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_frame/traits/trait.Hooks.html |
Closes #2977 The issue appears to stem from the `aquamarine` crate failing to render diagrams in re-exported crates. e.g. as raised [here](#2977), diagrams would render at `frame_support::traits::Hooks` but not the re-exported doc `frame::traits::Hooks`, even if I added `aquamarine` as a `frame` crate dependency. To resolve this, I followed advice in mersinvald/aquamarine#20 to instead render mermaid diagrams directly using JS by adding an `after-content.js`. --- Also fixes compile warnings, enables `--all-features` and disallows future warnings in CI. --------- Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Bastian Köcher <git@kchr.de>
Closes paritytech#2977 The issue appears to stem from the `aquamarine` crate failing to render diagrams in re-exported crates. e.g. as raised [here](paritytech#2977), diagrams would render at `frame_support::traits::Hooks` but not the re-exported doc `frame::traits::Hooks`, even if I added `aquamarine` as a `frame` crate dependency. To resolve this, I followed advice in mersinvald/aquamarine#20 to instead render mermaid diagrams directly using JS by adding an `after-content.js`. --- Also fixes compile warnings, enables `--all-features` and disallows future warnings in CI. --------- Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Bastian Köcher <git@kchr.de>
Closes #2977
The issue appears to stem from the
aquamarine
crate failing to render diagrams in re-exported crates.e.g. as raised here, diagrams would render at
frame_support::traits::Hooks
but not the re-exported docframe::traits::Hooks
, even if I addedaquamarine
as aframe
crate dependency.To resolve this, I followed advice in mersinvald/aquamarine#20 to instead render mermaid diagrams directly using JS by adding an
after-content.js
.Also fixes compile warnings, enables
--all-features
and disallows future warnings in CI.