makinacorpus / drupal-typomagic
Drupal字体增强
1.0.0-alpha1
2018-04-13 12:54 UTC
Requires
Suggests
- makinacorpus/drupal-sf-dic: If you wish to use twig theme engine, this module provides twig filters
This package is not auto-updated.
Last update: 2024-09-15 04:52:36 UTC
README
字体魔法
通过以下库为用户输入的文本提供一系列自动增强的字体
- https://github.com/heiglandreas/Org_Heigl_Hyphenator
- https://github.com/jolicode/JoliTypo
- https://github.com/makinacorpus/php-header-fixer
它提供了以下集成
- 高度可配置的字段格式化器,扩展了核心的文本模块,提供了所有语义、字体和微观字体特征
- 独立实现语义和微观字体特征的过滤器
- 页面和节点模板处理,以修复标题的微观字体。
未来还将带来以下附加功能
- 当与makinacorpus/drupal-sf-dic一起使用时,提供twig过滤器
- 处理标题的块模板
- 以及可能的其他功能集。
为什么叫这个名字?因为在https://www.drupal.org上的"字体"命名空间导致403错误,所以我想它不能使用。
此模块取代了https://github.com/Anaethelion/JoliTypo-for-Drupal Drupal模块(该模块运行良好,我们认识它的作者)。
安装
首先,您应使用composer安装此模块,以便获取所有依赖项
composer require makinacorpus/drupal-typomagic
然后启用它
drush -y en typomagic
入门指南
如往常一样配置您的过滤器或字段格式化器,表单会引导您。
默认情况下,JoliTypo过滤器配置为法语字体,要用于其他语言,请参阅位于https://github.com/jolicode/JoliTypo#fixer-recommendations-by-locale的文档
配置
并非所有配置都将在此处文档化,因为配置选项很多,并且可能会在未来演变,无论如何,以下是一些您可能希望在您的settings.php
文件中调整的变量
$conf['typomagic_title_page'] = false
将禁用页面标题处理。
$conf['typomagic_title_node'] = false
将禁用节点标题处理。