diff --git a/README.md b/README.md index 62daebe..a263d7c 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -MJML in PHP -=========== +# MJML in PHP ![PHPUnit](https://github.com/qferr/mjml-php/actions/workflows/php.yml/badge.svg) A simple PHP library to render MJML to HTML. There are two ways for integrating MJML in PHP: -* using the MJML API -* using the MJML library + +- using the MJML API +- using the MJML library ### Installation @@ -29,7 +29,7 @@ If you want a specific version, use the following syntax: `npm install mjml@4.7. render(' diff --git a/src/Renderer/BinaryRenderer.php b/src/Renderer/BinaryRenderer.php index d572d78..17e8f89 100644 --- a/src/Renderer/BinaryRenderer.php +++ b/src/Renderer/BinaryRenderer.php @@ -36,8 +36,9 @@ public function __construct(string $bin) /** * @inheritDoc */ - public function render(string $content): string + public function render(string $content = null): string { + if (empty($content)) $content = getcwd() . '/node_modules/.bin/mjml'; $process = new Process($this->command, $content); $process->run();