承接 allmarkedup/twig-extensions 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

allmarkedup/twig-extensions

最新稳定版本:v0.2

Composer 安装命令:

composer require allmarkedup/twig-extensions

包简介

A few handy extensions for Twig.

README 文档

README

A few handy extensions for Twig.

Included extensions:

Installation and use

Using composer:

$ composer require allmarkedup/twig-extensions

Then load the required extension(s) into the Twig environment when setting it up as per the instructions in the Twig docs. For example, to use the Markdown extension, you would use something like this:

<?php
use Amu\Twig\TwigMarkdownExtension as MarkdownExtension;
//...
$twig = new Twig_Environment($loader, $options);
$twig->addExtension(new MarkdownExtension());

Included extensions

Markdown Extension

The Markdown extension uses Parsedown under the hood to allow for easy Markdown -> HTML conversion in your templates.

To install:

<?php
$twig->addExtension(new Amu\Twig\TwigMarkdownExtension());

Use it in your templates as a filter:

{{ 'This is a **string**' | markdown }}

Or use it as a tag:

{% markdown %}
_This sentence is emphasised_
> And this is a quote.
{% endmarkdown %}

Running tests

Tests can be run using PHP Unit:

$ vendor/bin/phpunit 

The project also includes a Grunt watch task to run the PHP Unit tests when files are updated which you can use for your convenience.

统计信息

  • 总下载量: 9.92k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固