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.
Automatically converts bare URLs to clickable links.
Check out https://github.com/markup-carve/carve for more info.
Email us at hello@example.com for support.
Check out https://github.com/markup-carve/carve for more info.
Email us at hello@example.com for support.
['type' => 'autolink']
Adds target="_blank" and rel="noopener noreferrer" to external links.
Visit [our site](https://example.com) (internal) or [GitHub](https://github.com) (external).
[
'type' => 'external_links',
'internal_hosts' => ['localhost', 'example.com'],
]
Converts straight quotes to typographic ("curly") quotes.
He said "Hello, world!" and she replied 'How are you?'
It's a beautiful day -- don't you think?
He said “Hello, world!” and she replied ‘How are you?’
It’s a beautiful day – don’t you think?
['type' => 'smart_quotes']
Adds anchor links to headings for easy linking.
# Introduction
Some intro text.
## Getting Started
More content here.
### Installation
Install instructions.
[
'type' => 'heading_permalinks',
'symbol' => '#',
'position' => 'after',
'class' => 'heading-anchor',
]
Converts @username to clickable profile links.
Thanks @dereuromark for the review!
Also cc @teamlead for the docs review.
Thanks @dereuromark for the review!
Also cc @teamlead for the docs review.
[
'type' => 'mentions',
'mention_url' => 'https://github.com/{name}',
'user_class' => 'mention',
]
Generates a table of contents from headings. Place it with a ::: toc block.
::: toc
:::
# 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',
]
Supports [[Page Name]] wiki-style links.
See [[Home]] for the main page.
Related: [[Getting Started]] and [[API Reference]].
See Home for the main page.
Related: Getting Started and API Reference.
[
'type' => 'wikilinks',
'url_template' => '/extensions?wiki={page}',
'link_class' => 'wiki-link',
]
Automatically adds default attributes to elements by type (e.g., lazy loading for images).
Here's an image:

And a table:
|= Name |= Role |
| Alice | Admin |
| Bob | User |
A [link](https://example.com) with default class.
[
'type' => 'default_attributes',
'defaults' => [
'image' => ['loading' => 'lazy', 'decoding' => 'async'],
'table' => ['class' => 'table table-striped'],
'link' => ['class' => 'styled-link'],
],
]
Parses YAML/TOML/JSON frontmatter blocks at the start of documents.
---yaml
title: My Document
author: John Doe
date: 2026-01-15
---
# Document Title
This content has YAML frontmatter.
This content has YAML frontmatter.
[
'type' => 'frontmatter',
'default_format' => 'yaml',
'render_as_comment' => true,
]
Converts span attributes to semantic HTML5 elements: <kbd>, <dfn>, <abbr>.
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.
Press Ctrl+C to copy.
The term API is important.
HTML is the foundation of the web.
['type' => 'semantic_span']
A mermaid fence renders as a diagram in the browser; in static
mode the source is preserved (graceful degradation).
``` mermaid
graph LR
A[Write Carve] --> B{Render}
B --> C[Interactive HTML]
B --> D[Static / PDF]
```
graph LR
A[Write Carve] --> B{Render}
B --> C[Interactive HTML]
B --> D[Static / PDF]
'with_mermaid' => [
'extensions' => [
['type' => 'mermaid'],
],
],
Transforms code-group divs into tabbed code block interfaces. Click the tabs below!
::: code-group
```php [Composer]
composer require markup-carve/laravel-carve
```
``` bash [NPM]
npm install @example/carve
```
``` yaml [Docker]
services:
app:
image: php:8.2
```
:::
composer require markup-carve/laravel-carve
npm install @example/carve
services:
app:
image: php:8.2
['type' => 'code_group']
Styled callout blocks for notes, tips, warnings, etc.
::: note
This is a note.
:::
::: warning Custom Title
Be careful with this.
:::
::: tip
Carve supports admonitions out of the box.
:::
Note
This is a note.
::: warning Custom Title Be careful with this. :::
Tip
Carve supports admonitions out of the box.
['type' => 'admonition']