Readme.rst 663 B

12345678910111213141516171819202122232425262728
  1. Neighbor Articles Plugin for Pelican
  2. ====================================
  3. This plugin adds ``next_article`` (newer) and ``prev_article`` (older)
  4. variables to the article's context
  5. Usage
  6. -----
  7. .. code-block:: html+jinja
  8. <ul>
  9. {% if article.prev_article %}
  10. <li>
  11. <a href="{{ SITEURL }}/{{ article.prev_article.url}}">
  12. {{ article.prev_article.title }}
  13. </a>
  14. </li>
  15. {% endif %}
  16. {% if article.next_article %}
  17. <li>
  18. <a href="{{ SITEURL }}/{{ article.next_article.url}}">
  19. {{ article.next_article.title }}
  20. </a>
  21. </li>
  22. {% endif %}
  23. </ul>