it-blaster / typograph-bundle
The typograph bundle for Symfony based on E. Muravjev's Typograph
Installs: 14 298
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 6
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.2
- symfony/framework-bundle: ~2.1
This package is not auto-updated.
Last update: 2024-12-21 18:14:30 UTC
README
The typograph bundle for Symfony based on E. Muravjev's Typograph
Installation
Add it-blaster/typograph-bundle to your composer.json
file and run composer
... "require": { "it-blaster/typograph-bundle": "1.0.*" } ...
And register the bundle in your AppKernel.php
... new Fenrizbes\TypographBundle\FenrizbesTypographBundle(), ...
Usage
The bundle contains a TwigExtension which can be used in your templates:
{{ content | typograph }}
Configuration
The bundle allows you to pass options that E. Muravjev's Typograph supports. You can use a default config, redefine it:
fenrizbes_typograph: configs: default: Text.paragraphs: on OptAlign.oa_oquote: off OptAlign.oa_obracket_coma: off
or define your configs:
fenrizbes_typograph: configs: default: Text.paragraphs: off OptAlign.oa_oquote: off OptAlign.oa_obracket_coma: off articles: Text.paragraphs: on news: Text.paragraphs: off
and use them where you need:
{{ article.content | typograph('articles') }}