mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
fixed related_posts plugin
This commit is contained in:
parent
54ffdf8ae5
commit
8710982d2a
2 changed files with 23 additions and 59 deletions
|
|
@ -291,10 +291,10 @@ Related posts
|
|||
-------------
|
||||
|
||||
This plugin adds the ``related_posts`` variable to the article's context.
|
||||
To enable, add the following to your settings file::
|
||||
By default, up to 5 articles are listed. You can customize this value by
|
||||
defining ``RELATED_POSTS_MAX`` in your settings file::
|
||||
|
||||
from pelican.plugins import related_posts
|
||||
PLUGINS = [related_posts]
|
||||
RELATED_POSTS_MAX = 10
|
||||
|
||||
You can then use the ``article.related_posts`` variable in your templates.
|
||||
For example::
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue