From 793dd63db2adbd1cc4de3b60da6d4c63b4331185 Mon Sep 17 00:00:00 2001 From: Jan Stanley Watt Date: Thu, 9 Mar 2023 00:27:09 +0900 Subject: [PATCH] Add README.md --- README.md | 30 ++++++++++++++++++++++++++++++ composer.json | 1 + 2 files changed, 31 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..597f67a --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# Commonmark Figure Extension + +[League\CommonMark](https://github.com/thephpleague/commonmark)extension for HTML diagrams and captions inspired by [Markdig](https://github.com/xoofx/markdig). + +## Installation +```Console +$ composer require jsw/commonmark-figure-extension +``` + +## Usage +```php +$environment = new Environment(); +$environment->addExtension(new CommonMarkCoreExtension()); + ->addExtension(new FitureExtension()); + +$converter = new MarkdownConverter($environment); + +$markdown =<<example-image +//
This is caption for image
+echo $converter->convert($markdown); +``` + +## License +Apache-v2 \ No newline at end of file diff --git a/composer.json b/composer.json index 4c1b41c..8a9949e 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,7 @@ ], "description": "League/commonmark extension for HTML figure and caption.", "license": "Apache-2.0", + "readme": "README.md", "require-dev": { "league/commonmark": "^2.3", "phpunit/phpunit": "^9.5",