Deniz Turgut 69a83d3e8f Neighbor Articles plugin 12 jaren geleden
..
README.rst 69a83d3e8f Neighbor Articles plugin 12 jaren geleden
neighbors.py 69a83d3e8f Neighbor Articles plugin 12 jaren geleden

README.rst

Neighbor Articles Plugin for Pelican
====================================

This plugin adds ``next_article`` (newer) and ``prev_article`` (older)
variables to the article's context

Installation
------------
To enable, ensure that ``neighbors.py`` is in somewhere you can ``import``.
Then use the following in your `settings`::

PLUGINS = ["neighbors"]

Or you can put the plugin in ``plugins`` folder in pelican installation. You
can find the location by typing::

python -c 'import pelican.plugins as p, os; print os.path.dirname(p.__file__)'

Once you get the folder, copy the ``neighbors.py`` there and use the following
in your settings::

PLUGINS = ["pelican.plugins.neighbors"]

Usage
-----

.. code-block:: html+jinja


    {% if article.prev_article %}


  • {{ article.prev_article.title }}


  • {% endif %}
    {% if article.next_article %}


  • {{ article.next_article.title }}


  • {% endif %}