flex/docs/content/articles/flex-pelican-theme-2.0.md
Alexandre Vicenzi 798ddee7bd Docs.
2018-01-13 01:31:08 -02:00

1.2 KiB

Title: Flex 2.0 Date: 2016-09-13 08:00 Modified: 2016-09-13 08:00 Category: News Tags: pelican, python, theme Slug: flex-pelican-theme-update-2-0 Cover: images/flex-screenshot.png

Flex theme 2.0 comes with new features. In fact there are two new features.

The biggest change is localization support. Yes, Flex now can be translated into your language. You can read about here.

The biggest challege was to create a way to translate without breaking old versions. If you use English it changes nothing for you. But if you want to use translation you need to add new lines to your pelican configuration file.

Here is a small example to use Flex in another language.

# Enable i18n plugin, probably you already have some others here.
PLUGINS = ['i18n_subsites']
# Enable Jinja2 i18n extension used to parse translations.
JINJA_EXTENSIONS = ['jinja2.ext.i18n']
# Default theme language.
I18N_TEMPLATES_LANG = 'en'
# Your language.
DEFAULT_LANG = 'de'
OG_LOCALE = 'de_DE'
LOCALE = 'de_DE'

Last but not least, Flex supports the feature "X minute read", similar Medium.

Hope you enjoy this version.