Fixing Warnings in Pelican

12 December 2017

In this article, I'll document warnings that I've encounter so far using the Pelican library to build a blog.

Warning after Pelican 3.7.0 update

The previous Pelican 3.7.0 release brings some changes. The release log lists all the changes which also mentions that JINJA_EXTENSIONS is replaced with JINJA_ENVIRONMENT in the pelicanconf.py file.

  • WARNING: JINJA_EXTENSIONS setting has been deprecated, moving it to JINJA_ENVIRONMENT setting. To avoid this warning I replace the line

        JINJA_EXTENSIONS = ['jinja2.ext.i18n']
    
    with this
    
        JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}

Other Warnings

  • WARNING: Locale could not be set. Check the LOCALE setting, ensuring it is valid and available on your system. This warning can be avoid by defining the LOCALE variable in the pelicanconf.py file. As an example:

        LOCALE = ('en_GB', 'de_DE')