From 89ee0b4de0f75a50842fef28486bfeef37635c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Andr=C3=A9?= Date: Sun, 27 Sep 2026 16:35:24 +0200 Subject: [PATCH] Add the linked ALTO README banner and early example --- .github/alto-commonmark.svg | 16 ++++++++++++++++ README.md | 23 ++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/alto-commonmark.svg diff --git a/.github/alto-commonmark.svg b/.github/alto-commonmark.svg new file mode 100644 index 0000000..782fe71 --- /dev/null +++ b/.github/alto-commonmark.svg @@ -0,0 +1,16 @@ + + + ALTO CommonMark + Install with composer require alto/commonmark. + + + diff --git a/README.md b/README.md index 6c48212..c1caaa5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,28 @@ -# Alto CommonMark +

+ + ALTO CommonMark + +

Reusable `league/commonmark` extensions in a monorepo, installable as either the umbrella package `alto/commonmark` or as standalone per-extension packages. +## Quick start + +```php +use Alto\CommonMark\Extension\HeadingLevel\HeadingLevelExtension; +use League\CommonMark\Environment\Environment; +use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension; +use League\CommonMark\MarkdownConverter; + +$environment = new Environment(); +$environment->addExtension(new CommonMarkCoreExtension()); +$environment->addExtension(new HeadingLevelExtension(['down' => 1])); + +echo (new MarkdownConverter($environment))->convert('# Hello'); +``` + +This renders `

Hello

` so the document can sit beneath a page title. + ## Installation ```bash