aboutsummaryrefslogtreecommitdiff
path: root/plugins/typogrify/typogrify.py
blob: e3748fbd6f65b8e6fc051e99d44f2d9c8b07a78a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from pelican import signals
from filters import typogrify

def apply(data):

    if not data._content:
        return


    data._content = typogrify(data._content)

    metadata = data.metadata
    metadata['title'] = typogrify(metadata['title'])

def register():
    signals.content_object_init.connect(apply)