Static preview. Server-backed interactions are available only in a local checkout.

Extensions Demo

Carve supports various extensions to enhance markup capabilities. All bundled markup-carve/carve-php extensions are available - autolink, mentions, table of contents, wikilinks, admonitions, tabs, code groups and more.

Autolink

Automatically converts bare URLs to clickable links.

Source

Check out https://github.com/markup-carve/carve for more info.

Email us at hello@example.com for support.

Rendered

Check out https://github.com/markup-carve/carve for more info.

Email us at hello@example.com for support.

['type' => 'autolink']

External Links

Adds target="_blank" and rel="noopener noreferrer" to external links.

Source

Visit [our site](https://example.com) (internal) or [GitHub](https://github.com) (external).

Rendered

Visit our site (internal) or GitHub (external).

[
    'type' => 'external_links',
    'internal_hosts' => ['localhost', 'example.com'],
]

Smart Quotes

Converts straight quotes to typographic ("curly") quotes.

Source

He said "Hello, world!" and she replied 'How are you?'

It's a beautiful day -- don't you think?

Rendered

He said “Hello, world!” and she replied ‘How are you?’

It’s a beautiful day – don’t you think?

['type' => 'smart_quotes']

Heading Permalinks

Adds anchor links to headings for easy linking.

Source

# Introduction

Some intro text.

## Getting Started

More content here.

### Installation

Install instructions.

Rendered

Introduction #

Some intro text.

Getting Started #

More content here.

Installation #

Install instructions.

[
    'type' => 'heading_permalinks',
    'symbol' => '#',
    'position' => 'after',
    'class' => 'heading-anchor',
]

Mentions

Converts @username to clickable profile links.

Source

Thanks @dereuromark for the review!

Also cc @teamlead for the docs review.

Rendered

Thanks @dereuromark for the review!

Also cc @teamlead for the docs review.

[
    'type' => 'mentions',
    'mention_url' => 'https://github.com/{name}',
    'user_class' => 'mention',
]

Table of Contents

Generates a table of contents from headings. Place it with a ::: toc block.

Source

::: toc
:::

# Chapter 1

Content for chapter 1.

## Section 1.1

Subsection content.

## Section 1.2

More content.

# Chapter 2

Chapter 2 content.

Rendered

Chapter 1

Content for chapter 1.

Section 1.1

Subsection content.

Section 1.2

More content.

Chapter 2

Chapter 2 content.

[
    'type' => 'table_of_contents',
    'toc_class' => 'toc',
]

Wikilinks

Supports [[Page Name]] wiki-style links.

Source

See [[Home]] for the main page.

Related: [[Getting Started]] and [[API Reference]].

Rendered

See Home for the main page.

Related: Getting Started and API Reference.

[
    'type' => 'wikilinks',
    'url_template' => '/extensions?wiki={page}',
    'link_class' => 'wiki-link',
]

Default Attributes

Automatically adds default attributes to elements by type (e.g., lazy loading for images).

Source

Here's an image:

![Photo](https://placehold.co/150)

And a table:

|= Name |= Role |
| Alice | Admin |
| Bob | User |

A [link](https://example.com) with default class.

Rendered (inspect HTML)

Here’s an image:

Photo

And a table:

NameRole
AliceAdmin
BobUser

A link with default class.

[
    'type' => 'default_attributes',
    'defaults' => [
        'image' => ['loading' => 'lazy', 'decoding' => 'async'],
        'table' => ['class' => 'table table-striped'],
        'link' => ['class' => 'styled-link'],
    ],
]

Frontmatter

Parses YAML/TOML/JSON frontmatter blocks at the start of documents.

Source

---yaml
title: My Document
author: John Doe
date: 2026-01-15
---

# Document Title

This content has YAML frontmatter.

Rendered (check HTML source for comment)

Document Title

This content has YAML frontmatter.

[
    'type' => 'frontmatter',
    'default_format' => 'yaml',
    'render_as_comment' => true,
]

Semantic Spans

Converts span attributes to semantic HTML5 elements: <kbd>, <dfn>, <abbr>.

Source

Press [Ctrl+C]{kbd} to copy.

The term [API]{dfn="Application Programming Interface"} is important.

[HTML]{abbr="HyperText Markup Language"} is the foundation of the web.

Rendered

Press Ctrl+C to copy.

The term API is important.

HTML is the foundation of the web.

['type' => 'semantic_span']

Mermaid Diagrams

A mermaid fence renders as a diagram in the browser; in static mode the source is preserved (graceful degradation).

Source

``` mermaid
graph LR
    A[Write Carve] --> B{Render}
    B --> C[Interactive HTML]
    B --> D[Static / PDF]
```

Rendered

Configuration

'with_mermaid' => [
    'extensions' => [
        ['type' => 'mermaid'],
    ],
],

Code Group

Transforms code-group divs into tabbed code block interfaces. Click the tabs below!

Source

::: code-group
```php [Composer]
composer require markup-carve/laravel-carve
```

``` bash [NPM]
npm install @example/carve
```

``` yaml [Docker]
services:
  app:
    image: php:8.2
```
:::

Rendered

composer require markup-carve/laravel-carve
npm install @example/carve
services:
  app:
    image: php:8.2
['type' => 'code_group']

Admonition

Styled callout blocks for notes, tips, warnings, etc.

Source

::: note
This is a note.
:::

::: warning Custom Title
Be careful with this.
:::

::: tip
Carve supports admonitions out of the box.
:::

Rendered

Note

This is a note.

::: warning Custom Title Be careful with this. :::

Tip

Carve supports admonitions out of the box.

['type' => 'admonition']