photon/template-markdown

Photon模板引擎的Markdown解析器

v1.1.2 2016-06-08 12:24 UTC

This package is auto-updated.

Last update: 2024-09-18 19:23:21 UTC


README

Build Status

模板标签用于过滤Markdown文本到HTML

快速开始

  1. 将模块添加到您的项目中

    composer require "photon/template-markdown:dev-master"

或指定版本

composer require "photon/template-markdown:1.0.0"
  1. 在模板引擎配置中添加标签和修饰符

    'template_tags' => array( 'Markdown' => '\photon\template\tag\Markdown', ), 'template_modifiers' => array( 'Markdown' => '\Michelf\MarkdownExtra::defaultTransform', ),

  2. 编写一些模板

    {$mdtext|Markdown|safe}

或者

{Markdown $mdtext}
  1. 享受