Code

Use fenced code blocks for single syntax-highlighted examples. Use CodeGroup when the same example has package-manager, framework, or platform variants.

Usage

```bash title="Install"
npm install reallysimpledocs
```

Add title="..." after the language to render a titled code block.

Options

Fenced code

MetadataTypeDefaultNotes
languagestring"text"Language passed to Shiki.
titlestringundefinedOptional header label, written as title="..." after the language.

CodeGroup

PropTypeDefaultNotes
classstring""Extra classes applied to the wrapper.

CodeGroup expects titled fenced code blocks as children. Untitled code blocks are ignored because there is no tab label. Keep the CodeGroup name for tabbed code; use Tabs for generic grouped content.

Examples

Default

npm install reallysimpledocs

With title

astro.config.mjs
import { defineConfig } from "astro/config";
import reallySimpleDocs from "reallysimpledocs/astro";

export default defineConfig({
  integrations: [
    reallySimpleDocs({
      site: {
        title: "Acme Docs",
      },
    }),
  ],
});

Tabbed group

npm install reallysimpledocs basecoat-css@beta tailwindcss