Bonjour Brice,
Thank you for your patches on Github. Version 0.1.2 was installed successfully. Just remember to change the version n° in blueprints.yaml file.
Still, I failed to have the plugin have good result on pages output.
Here is my system:
My local website is in French (based on recent and updated default grav-admin-v1.7.34 not much modified).
My user/config/system.yaml contain:
pages:
theme: quark
markdown:
extra: false
process:
markdown: true
twig: false
languages:
supported:
- fr
My user/config/site.yaml is:
default_lang: fr
My user/config/plugins/better-typography.yaml is:
enabled: true
perLanguageSettings:
-
language: fr
useSmartQuotes: true
smartQuotesStyle: doubleGuillemetsFrench
smartQuotesStyleSecondary: doubleCurled
useSmartDashes: true
smartDashesStyle: international
applyHyphenations: true
applyFrenchSpecific: true
useSmartDiacritics: false
smartDiacriticsLanguage:
My modular modular_test.md is:
---
menu: 'Test'
h2: 'Une "démonstration. . . --- rapide --- du plugin Better Typography"... Bien sûr, nous ne sommes plus au XVIe siècle! On teste les (c) ou (r) etc. mais aussi les 1/2 fractions, et les surfaces de 12m2. '
---
Une "démonstration. . . --- rapide --- du plugin Better Typography"... Bien sûr, nous ne sommes plus au XVIe siècle! On teste les (c) ou (r) etc. mais aussi les 1/2 fractions, et les surfaces de 12m2.
My modular_test.html.twig is
{% set test_h2 = page.header.h2 %}
<h2>{{ test_h2 }}</h2>
{{ content|raw }}
and the output is unchanged.
Does this mean that your twig filter is required everywhere?
When adding your twig filter:
<h2>{{ test_h2|bettertypo('fr') }}</h2>
{{ content|raw|bettertypo('fr') }}
the result is
<p>Une « démonstration… — rapide — du plugin Better Typography »… Bien sûr, nous ne sommes plus au XVI<sup class="ordinal">e</sup> siècle ! On teste les © ou ® etc. mais aussi les <sup class="numerator">1</sup>⁄<sub class="denominator">2</sub> fractions, et les surfaces de 12 m². </p>
and when removing |raw
, result is same.
What did I miss?
Otherwise, seems to be a great plugin for French users. Thank you for the effort!