1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-04 20:27:40 +02:00

#431 markdown plugin added

This commit is contained in:
Awilum
2018-03-05 00:35:50 +03:00
parent 0b94ad6d1e
commit 60104a0d83
3 changed files with 38 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ charset: UTF-8
theme: default
plugins:
- Markdown
pages:
flush_cache: false

View File

@@ -0,0 +1,24 @@
<?php
namespace Monstra;
class Markdown extends Plugin
{
/**
* @var Monstra
*/
protected $monstra;
/**
* Construct
*/
public function __construct(Monstra $c)
{
$this->monstra = $c;
$this->monstra['filters']->addListener('content', function($content) {
return $this->monstra['markdown']->text($content);
});
}
}
new Markdown($monstra);

View File

@@ -0,0 +1,13 @@
name: Markdown
version: 1.0.0
description: "Markdown parser plugin for Monstra"
author:
name: Sergey Romanenko
email: awilum@msn.com
url: http://monstra.org
homepage: http://monstra.org
bugs: http://monstra.org
license: MIT
# Plugin settings
enabled: true