aboutsummaryrefslogtreecommitdiff
path: root/plugins/typogrify/typogrify.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/typogrify/typogrify.py')
-rw-r--r--plugins/typogrify/typogrify.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/typogrify/typogrify.py b/plugins/typogrify/typogrify.py
new file mode 100644
index 0000000..e3bc268
--- /dev/null
+++ b/plugins/typogrify/typogrify.py
@@ -0,0 +1,20 @@
+#!/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'])
+ data._summary = typogrify(data.summary)
+
+def register():
+ signals.content_object_init.connect(apply)