shiki

    shiki highlighter for rabbita

    shiki
    highlighter
    Download zip
    Author
    Version
    0.1.2
    License
    Apache-2.0
    Last updated
    1 hour ago
    Downloads
    6K

    Dependencies

    Yoorkin/shiki does not have a README file

    Config

    type Config derive(Eq)

    initialize

    fn initialize(langs~ : FixedArray[String], themes~ : FixedArray[String]) -> Unit

    initialize_static

    async fn initialize_static(langs~ : FixedArray[String], themes~ : FixedArray[String]) -> Unit

    Load a reusable Shiki highlighter before constructing static HTML.

    This is useful for renderers whose component tree must stay synchronous: await this once at the application boundary, then call static_code from any number of otherwise ordinary Html functions.

    static_code

    fn static_code(code : String, lang~ : String, light_theme~ : String, dark_theme~ : String) ->
    Html

    Render source with two preloaded Shiki themes. The generated foreground colors use CSS light-dark(), so a containing color-scheme switch updates existing code blocks without rebuilding the Rabbita tree.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io