Skip to content

Commit

Permalink
Fix #2930 -- specify utf-8 as default encoding for Mako
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Dec 5, 2017
1 parent 60e9861 commit a7ede10
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -27,6 +27,7 @@ Features
Bugfixes
--------

* Specify UTF-8 input encoding for Mako as default (Issue #2930)
* Don't trigger rebuilds in auto mode for files it's safe to ignore
(Issue #2906)
* Fix padding for Jupyter code blocks (Issue #2927)
Expand Down
2 changes: 2 additions & 0 deletions docs/manual.txt
Expand Up @@ -1272,6 +1272,8 @@ If you use the shortcode as paired, then the contents between the paired tags
will be available in the ``data`` variable. If you want to access the Nikola
object, it will be available as ``site``. Use with care :-)

.. note:: Template-based shortcodes use the same template engine as your site’s theme.

See :doc:`extending` for detailed information.

For example, if your ``shortcodes/foo.tmpl`` contains this:
Expand Down
1 change: 1 addition & 0 deletions nikola/plugins/template/mako.py
Expand Up @@ -93,6 +93,7 @@ def create_lookup(self):
self.lookup = TemplateLookup(
directories=self.directories,
module_directory=self.cache_dir,
input_encoding='utf-8',
output_encoding='utf-8')

def set_site(self, site):
Expand Down

0 comments on commit a7ede10

Please sign in to comment.