How to use the nikola.filters.typogrify function in Nikola

To help you get started, we’ve selected a few Nikola examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ubuntu-mate / ubuntu-mate.org / conf.py View on Github external
# in place.
#
# Or:
#
# A python callable, which will be called with the filename as
# argument.
#
# By default, only .php files uses filters to inject PHP into
# Nikola’s templates. All other filters must be enabled through FILTERS.
#
# Many filters are shipped with Nikola. A list is available in the manual:
# 
#
from nikola import filters
FILTERS = {
    ".html": [filters.typogrify],
    ".jpg":  [filters.jpegoptim],
    ".jpeg": [filters.jpegoptim],
    ".json": [filters.jsonminify],
    ".png":  [filters.optipng],
    ".xml":  [filters.xmlminify],
}



# Expert setting! Create a gzipped copy of each generated file. Cheap server-
# side optimization for very high traffic sites or low memory servers.
GZIP_FILES = True
# File extensions that will be compressed
# GZIP_EXTENSIONS = ('.txt', '.htm', '.html', '.css', '.js', '.json', '.atom', '.xml')
# Use an external gzip command? None means no.
# Example: GZIP_COMMAND = "pigz -k {filename}"