From f35a7b0e70032de2feec9f3bda09da44cf0e1073 Mon Sep 17 00:00:00 2001 From: srv Date: Mon, 28 Apr 2025 17:11:28 -0500 Subject: first commit --- plugins/neighbors/Readme.rst | 97 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 plugins/neighbors/Readme.rst (limited to 'plugins/neighbors/Readme.rst') diff --git a/plugins/neighbors/Readme.rst b/plugins/neighbors/Readme.rst new file mode 100644 index 0000000..022b399 --- /dev/null +++ b/plugins/neighbors/Readme.rst @@ -0,0 +1,97 @@ +Neighbor Articles Plugin for Pelican +==================================== + +This plugin adds ``next_article`` (newer) and ``prev_article`` (older) +variables to the article's context. + +Also adds ``next_article_in_category`` and ``prev_article_in_category``. + + +Usage +----- + +.. code-block:: html+jinja + + + + +Usage with the Subcategory plugin +--------------------------------- + +If you want to get the neigbors within a subcategory it's a little different. +Since an article can belong to more than one subcategory, subcategories are +stored in a list. If you have an article with subcategories like + +``Category/Foo/Bar`` + +it will belong to both subcategory Foo, and Foo/Bar. Subcategory neighbors are +added to an article as ``next_article_in_subcategory#`` and +``prev_article_in_subcategory#`` where ``#`` is the level of subcategory. So using +the example from above, subcategory1 will be Foo, and subcategory2 Foo/Bar. +Therefor the usage with subcategories is: + +.. code-block:: html+jinja + + + + -- cgit v1.2.3