LogoChemical Docs
Ctrl+K
On this page

Markdown Integration

Chemical lets you write content using Markdown directly inside your source files using the #md macro. This is extremely useful for blogs, documentation, or any text-heavy sections.

Using #md

Everything inside the #md block is converted to valid HTML at compile time. One difference in md is that it doesn't use braces, because that would conflict with its content, so we went with C preprocessor like approach.

#md

    # This is a Header
    
    You can use **bold**, *italic*, or [links](https://chemical-lang.org).

    
    - List items
    - Work as expected
    
    ```ch
    // Code blocks are also supported!

    func hello() { printf("hi"); }
    ```