From c53ba939c6abe855772cb508b96acf6a479f7d0d Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 15 Feb 2021 15:47:56 +0100 Subject: [PATCH] Make it possible to hide pages from the top navigation --- my_theme/templates/base.html | 2 ++ pelicanconf.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/my_theme/templates/base.html b/my_theme/templates/base.html index 87ed75c..eb9cb12 100644 --- a/my_theme/templates/base.html +++ b/my_theme/templates/base.html @@ -25,7 +25,9 @@ {% endfor %} {% if DISPLAY_PAGES_ON_MENU -%} {% for pg in pages %} + {% if pg.relative_source_path not in HIDDEN_PAGES %} {{ pg.title }} + {% endif %} {% endfor %} {% endif %} {% if DISPLAY_CATEGORIES_ON_MENU -%} diff --git a/pelicanconf.py b/pelicanconf.py index 58449f9..1e8eae8 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -45,6 +45,8 @@ LINKS = ( ('Jinja2', 'http://jinja.pocoo.org/'), ) +HIDDEN_PAGES = () + # Social widget SOCIAL = ( ('Matrix', 'https://matrix.to/#/@gergely:polonkai.eu'),