github withastro/starlight @astrojs/starlight-markdoc@0.3.0

15 hours ago

Minor Changes

  • #2931 10b93b3 Thanks @HiDeoo! - Adds support for the title, frame, and meta fence attributes to code blocks.

    These new optional attributes add support for Expressive Code text & line markers. The following example renders a code block using a terminal frame with a title:

    ```js {% title="editor.exe" frame="terminal" %}
    console.log('Hello, world!');
    ```

    Any other text or line markers should be specified using the meta fence attribute. For example, the following code block renders a code block using the diff syntax combined with the js language syntax highlighting and the markers text highlighted:

    ```diff {% meta="lang=js 'markers'" %}
      function thisIsJavaScript() {
        // This entire block gets highlighted as JavaScript,
        // and we can still add diff markers to it!
    -   console.log('Old code to be removed')
    +   console.log('New and shiny code!')
      }
    ```

    To learn more about all the available options, check out the Expressive Code documentation.

Don't miss a new starlight release

NewReleases is sending notifications on new releases.