diff --git a/meta/definitions/event.php b/meta/definitions/event.php index db5801a..e6c52e0 100644 --- a/meta/definitions/event.php +++ b/meta/definitions/event.php @@ -35,7 +35,7 @@ return [ public function execute(Routing $routing, Route $attribute) : void { if (null !== ($name = $attribute->name ?? null)) { - $this->extension->registerRoute($name, $attribute->getRoute(), $attribute->class, $attribute->classMethod, $attribute->methods ?? (array)$attribute->method); + $this->extension->registerRoute($name, $attribute->getRoute(), $attribute->class, $attribute->classMethod, (array) ( $attribute->method ?? $attribute->methods )); } } }, diff --git a/skeleton/.gitignore b/skeleton/.gitignore new file mode 100644 index 0000000..ee780a6 --- /dev/null +++ b/skeleton/.gitignore @@ -0,0 +1,8 @@ +.idea +.env +composer.lock +/private/ +/public/static/ +/public/.htaccess +/vendor/ +/var/ \ No newline at end of file diff --git a/src/ControllerTrait.php b/src/ControllerTrait.php index 94abc83..f2cb76f 100644 --- a/src/ControllerTrait.php +++ b/src/ControllerTrait.php @@ -9,6 +9,7 @@ use Notes\Security\Attribute\Security; use Picea, Picea\Ui\Method\FormContext; use TheBugs\Email\MailerInterface; use Storage\Session; +use League\CommonMark\CommonMarkConverter; use Psr\Http\Message\{ ServerRequestInterface, ResponseInterface }; @@ -129,9 +130,9 @@ trait ControllerTrait { throw new \BadFunctionCallException("League\CommonMark seems to be missing, please install dependency before trying to render Markdown content"); } - $markdown = ( new CommonMarkConverter() )->convertToHtml(file_get_contents($filepath)); + $markdown = ( new CommonMarkConverter() )->convert(file_get_contents($filepath)); - return $this->renderView("docs", get_defined_vars()); + return $this->renderView("lean/layout/docs", get_defined_vars()); } #[Ignore] diff --git a/view/lean/layout/docs.phtml b/view/lean/layout/docs.phtml new file mode 100644 index 0000000..b6c386b --- /dev/null +++ b/view/lean/layout/docs.phtml @@ -0,0 +1,60 @@ +{% title "Documentation" %} + + + + {% section "head" %} +
+ + +