From 13a8ea5d5f5461efdc835a29214a75111b058a01 Mon Sep 17 00:00:00 2001 From: Andrea Zonca Date: Fri, 27 Sep 2013 16:06:08 -0700 Subject: [PATCH] first implementation of google plus comments --- googleplus_comments/Readme.md | 20 +++++++++++++++ googleplus_comments/__init__.py | 1 + googleplus_comments/googleplus_comments.py | 29 ++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 googleplus_comments/Readme.md create mode 100644 googleplus_comments/__init__.py create mode 100644 googleplus_comments/googleplus_comments.py diff --git a/googleplus_comments/Readme.md b/googleplus_comments/Readme.md new file mode 100644 index 0000000..f824553 --- /dev/null +++ b/googleplus_comments/Readme.md @@ -0,0 +1,20 @@ +GooglePlus Comments Plugin For Pelican +================================== + +Adds GooglePlus comments to Pelican + +Add the plugin to `pelicanconf.py`: + + PLUGIN_PATH = 'pelican-plugins' + PLUGINS = ["googleplus_comments"] + +Add a `
` for comments to the `article.html` of your template: + +
+
+
+ {{ article.metadata.googleplus_comments }} + +See it working, and ask for support: + + diff --git a/googleplus_comments/__init__.py b/googleplus_comments/__init__.py new file mode 100644 index 0000000..4cbb6d1 --- /dev/null +++ b/googleplus_comments/__init__.py @@ -0,0 +1 @@ +from .googleplus_comments import * diff --git a/googleplus_comments/googleplus_comments.py b/googleplus_comments/googleplus_comments.py new file mode 100644 index 0000000..60495da --- /dev/null +++ b/googleplus_comments/googleplus_comments.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +""" +Google Comments Plugin For Pelican +================================== + +Adds Google comments to Pelican +""" + +from pelican import signals + +googleplus_comments_snippet = """ + + +""" + +def add_googleplus_comments(generator, metadata): + metadata["googleplus_comments"] = googleplus_comments_snippet + +def register(): + signals.article_generator_context.connect(add_googleplus_comments)