chiark / gitweb /
theme: standardize and document slug for blog-related pages.
authorVladimír Vondruš <mosra@centrum.cz>
Thu, 26 Oct 2017 20:25:27 +0000 (22:25 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Thu, 26 Oct 2017 20:25:27 +0000 (22:25 +0200)
doc/pelican/theme.rst
pelican-theme/templates/base_blog.html

index 58f1b4d934f61e22caae9de452920b9140a75449..7fd9c2e691a48a12aad14812b2b2d292b40f6247 100644 (file)
@@ -128,7 +128,9 @@ link title, second the URL, third page slug of the corresponding page (used
 to highlight currently active menu item) and fourth is a list of sub-menu items
 (which are 3-tuples --- link title, URL and page slug). Providing an empty slug
 will make the menu item never highlighted; providing an empty list of sub-menu
-items will not add any submenu.
+items will not add any submenu. All blog-related pages (articles, article
+listing, authors, tags, categories etc.) have the slug set to a special value
+``[blog]``.
 
 Example configuration, matching example markup from the
 `CSS page layout <{filename}/css/page-layout.rst#sub-menus-in-the-navbar>`__
@@ -142,7 +144,7 @@ documentation:
                      ('Showcase', '/showcase/', 'showcase', []),
                      ('Download', '/download/', 'download', [])]
 
-    LINKS_NAVBAR2 = [('Blog', '/blog/', 'blog', [
+    LINKS_NAVBAR2 = [('Blog', '/blog/', '[blog]', [
                         ('News', '/blog/news/', ''),
                         ('Archive', '/blog/archive/', '')]),
                      ('Contact', '/contact/', 'contact', [])]
index 6e9dbb8cf174d0688dcd2b94bc77d6888fd12020..22cc34748c7e2b3f1b345b8ce72bc0a8bfb8acca 100644 (file)
@@ -1,4 +1,4 @@
-{% set page_slug = 'blog' %}
+{% set page_slug = '[blog]' %}
 {% extends 'base.html' %}
 
 {% block title %}{{ BLOGNAME }}{% endblock %}