-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add custom CSS for pretty rustdoc
alerts
#158
Comments
This is already supported by rustdoc: https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html#adding-a-warning-block |
Yes, but just for warning blocks! Other alerts such as Note Notes Tip Tips Important Important information Caution And caution blocks are not supported. I used the CSS for |
@GuillaumeGomez would there be interest in adding those to rustdoc? |
I'd be willing to open a PR for them, if there is! My idea is: My **Markdown** content...
<div class="rustdoc-alert rustdoc-alert-tip">
<div class="rustdoc-alert-title">Fun Fact!</div>
Other Markdown `content`...
</div> |
I actually offered to add more kinds of "important block" but the team rejected the idea. You can see the discussion about it here. |
Got it! I'm still going to go ahead with #161 for |
Closes #158, extracted from #152, will be used in #109. This adds pretty alerts in `rustdoc` for `bevy_lint` that will be used in #109 when writing `bevy_lint`'s user documentation. <img width="908" alt="alerts in light mode" src="https://github.com/user-attachments/assets/4ee666f2-bb85-40de-b0f6-19b7a19a45e9"> <img width="908" alt="alerts in dark mode" src="https://github.com/user-attachments/assets/67ce7308-175c-4673-9c1e-7f89c59c4c73"> <img width="908" alt="alerts in dark mode, with the ayu theme" src="https://github.com/user-attachments/assets/e2de4717-bc63-4d1d-bb88-83714b3cf530">
Alerts are fun and a nice way to separate out information. We can use custom CSS to add these to
bevy_lint
's documentation.See #152 for a starting point on this.
The text was updated successfully, but these errors were encountered: