How did slint create custom syntax highlight, link, and preview for their code examples?

Link: slint::docs::langref - Rust

The slint code snippets have custom syntax highlight (I doubt rustdoc recognize this language by default), an edit link, and a preview image (which does not seem to work).

I also checked on their GitHub repo but saw nothing special.


1 Like

As far as I know, automatically generates documentation when a new crate is published to How did slint devs pass --html-in-header to the command line if they don't control the command line?

The crate's Cargo.toml file contains these lines:

rustdoc-args = [
features = ["document-features", "log"] documents the options supported in