forked from github/pelican
Add usage and intallation instructions
This commit is contained in:
parent
d2a28350ff
commit
2b933faaf2
1 changed files with 22 additions and 0 deletions
|
|
@ -5,7 +5,29 @@ Related posts plugin for Pelican
|
|||
================================
|
||||
|
||||
Adds related_posts variable to article's context
|
||||
|
||||
Settings
|
||||
--------
|
||||
To enable, add
|
||||
|
||||
from pelican.plugins import related_posts
|
||||
PLUGINS = [related_posts]
|
||||
|
||||
to your settings.py.
|
||||
|
||||
Usage
|
||||
-----
|
||||
{% if article.related_posts %}
|
||||
<ul>
|
||||
{% for related_post in article.related_posts %}
|
||||
<li>{{ related_post }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
|
||||
"""
|
||||
|
||||
related_posts = []
|
||||
def add_related_posts(generator, metadata):
|
||||
if 'tags' in metadata:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue