Download the PHP package aptoma/twig-markdown without Composer

On this page you can find all versions of the php package aptoma/twig-markdown. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package twig-markdown

Twig Markdown Extension

Build Status

THIS EXTENSION IS NO LONGER MAINTAINED, AND WE WILL NOT MAKE ANY NEW RELEASES. IF ANYONE WANTS TO TAKE OVER, PLEASE MAKE A FORK AND PUBLISH A NEW PACKAGE, AND WE'LL LINK TO THE NEW VERSION.

Twig Markdown extension provides a new filter and a tag to allow parsing of content as Markdown in Twig templates.

This extension could be integrated with several Markdown parser as it provides an interface, which allows you to customize your Markdown parser.

Supported parsers

Features

When used as a tag, the indentation level of the first line sets the default indentation level for the rest of the tag content. From this indentation level, all same indentation or outdented levels text will be transformed as regular text.

This feature allows you to write your Markdown content at any indentation level without caring of Markdown internal transformation:

Installation

Run the composer command to install the latest stable version:

Or update your composer.json:

You can choose to provide your own Markdown engine, although we recommend using michelf/php-markdown:

You may also use the PHP League CommonMark engine:

Usage

Twig Extension

The Twig extension provides the markdown tag and filter support.

Assuming that you are using composer autoloading, add the extension to the Twig environment:

Twig Token Parser

The Twig token parser provides the markdown tag only!

Symfony

To use this extension in a Symfony 3/4 app (including Pimcore), add the following snippet to your app's app/config/services.yml file:

GitHub Markdown Engine

MarkdownEngine\GitHubMarkdownEngine provides an interface to GitHub's markdown engine using their public API via KnpLabs\php-github-api. To reduce API calls, rendered documents are hashed and cached in the filesystem. You can pass a GitHub repository and the path to be used for caching to the constructor:

In order to authenticate the API client (for instance), it's possible to pass an own instance of \GitHub\Client instead of letting the engine create one itself:

Using a different Markdown parser engine

If you want to use a different Markdown parser, you need to create an adapter that implements Aptoma\Twig\Extension\MarkdownEngineInterface.php. Have a look at Aptoma\Twig\Extension\MarkdownEngine\MichelfMarkdownEngine for an example.

Tests

The test suite uses PHPUnit:

$ phpunit

License

Twig Markdown Extension is licensed under the MIT license.


All versions of twig-markdown with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0|^8.0
twig/twig Version ^2.7.0|^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aptoma/twig-markdown contains the following files

Loading the files please wait ....