aboutsummaryrefslogtreecommitdiff
path: root/plugins/typogrify/typogrify.py
blob: 7f5f568d6410cf03576928e80c824ac4093b6bec (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 typogrify.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)