Markdown Rendering#
Inkstone uses league/commonmark to render Markdown into HTML.
The parser supports documentation-style Markdown, including GitHub Flavored Markdown features.
Supported Markdown#
Inkstone supports:
- headings
- paragraphs
- links
- images
- tables
- task lists
- block quotes
- fenced code blocks
- autolinks
- strikethrough
- footnotes
- raw HTML when
html_inputis set toallow
Frontmatter#
Frontmatter is extracted before Markdown rendering:
---
title: Installation
order: 1
---
# Installation
Installation
Metadata is stored on the Document DTO and used by navigation, rendering, and search.
Tables#
| Feature | Status |
| --- | --- |
| Markdown | Supported |
| Search | Supported |
| Static output | Supported |
| Feature | Status |
|---|---|
| Markdown | Supported |
| Search | Supported |
| Static output | Supported |
Task Lists#
- [x] Install package
- [x] Build docs
- [ ] Deploy output
- Install package
- Build docs
- Deploy output
Footnotes#
Inkstone supports footnotes in Markdown.[^note]
[^note]: Footnotes are rendered by CommonMark.
Heading Anchors#
Headings receive stable IDs and a hover copy button:
<h2 id="installation">Installation</h2>
Installation
The generated theme also builds an "On this page" sidebar from headings below H1.
Code Blocks#
Code blocks are highlighted with Phiki during the static build.
Filenames#
Specify a filename using filename, file, or title:
```php filename="config/inkstone.php"
return [
'source_path' => 'docs',
];
```
Rendered result:
return [
'source_path' => 'docs',
];
Line Highlighting#
Highlight lines with curly braces:
```php {1,3-4}
// Line 1 is highlighted
// Line 2 is not
// Line 3 is highlighted
// Line 4 is highlighted
```
// Line 1 is highlighted
// Line 2 is not
// Line 3 is highlighted
// Line 4 is highlighted
Or use the highlight attribute:
```php highlight="1,3-4"
// Same result as above
```
// Same result as above
Copy Buttons#
Code blocks include a copy button by default. Disable it with:
'theme' => [
'syntax_highlighting' => [
'copy_button' => false,
],
],