Rework navigation a bit

This commit is contained in:
Jesse Braham 2025-02-17 07:38:48 +01:00
parent aa88d6f909
commit 7ff9a3c164
2 changed files with 8 additions and 10 deletions

View File

@ -3,6 +3,7 @@
# Basic Settings
USE_FOLDER_AS_CATEGORY = True
DISPLAY_PAGES_ON_MENU = True
DELETE_OUTPUT_DIRECTORY = True
JINJA_ENVIRONMENT = {"trim_blocks": True, "lstrip_blocks": True}
@ -75,14 +76,8 @@ DEFAULT_LANG = "en"
THEME = "theme"
MENUITEMS = [
("posts", ""),
("series", "series.html"),
("about", "about.html"),
]
SOCIAL = [
("email", "mailto:admin@hatebit.org"),
("email", "mailto:jesse@hatebit.org"),
("git", "https://hatebit.org/"),
("feed", f"{SITEURL}/{FEED_ALL_ATOM}"),
]

View File

@ -5,9 +5,12 @@
</div>
<div class="mt-6 md:mt-0">
<nav role="navigation">
{% for (title, url) in MENUITEMS %}
<a href="{{ SITEURL }}/{{ url }}" title="{{ title }}">/{{ title }}</a>
<a href="{{ SITEURL }}/" title="posts">/posts</a>
{% if DISPLAY_PAGES_ON_MENU %}
{% for p in pages|sort(attribute="sortorder") %}
<a href="{{ SITEURL }}/{{ p.url }}" title="{{ p.title|lower }}">/{{ p.title|lower }}</a>
{% endfor %}
{% endif %}
</nav>
</div>
</div>