This guide shows you how to setup the plugin for basic usage. The default theme has an comment form included. This form allows your visitors to easily write comments and send them to you via email [1].
Merge the ./theme
folder with your own theme folder, or copy the files manually
mkdir -p [yourtheme]/templates/pcs
mkdir -p [yourtheme]/static/js
cp ./theme/templates/pcs/comments.html [yourtheme]/templates/pcs/comments.html
cp ./theme/static/js/comments.js [yourtheme]/static/js/comments.html
Modify your article.html
template:
{% import 'pcs/comments.html' as pcs with context %}
to the top{{ pcs.comments_quickstart("emailuser", "example.com") }}
where you want your comments (e.g. below {{ article.content }}
)mailto:
link [1]Enable the plugin: pelicanconf.py
(See also How to use plugins)
PELICAN_COMMENT_SYSTEM = True
PELICAN_COMMENT_SYSTEM_IDENTICON_DATA = ('author',)
pcs.comments_quickstart
you can also use the other macros available in comments.html
.
They are a bit more flexible and may generate "better" html output e.g.:
[1] The comment form generates a mailto:
link on submisson. The resulting email contains a valid Markdown block. Now you only have to copy this block to a new file, obviating the need to gather the metadata (such as date, author, replyto) yourself.