diff options
author | Starfall <us@starfall.systems> | 2023-05-17 23:48:16 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2023-05-24 12:51:23 -0500 |
commit | 1df389da097411e437aa33aa104132bc593e1ed4 (patch) | |
tree | 73436a20e5431f8a993c0ab700b21da52e9290ec /_includes | |
parent | 59b4b8a05c0db82ffec953f0e2e6e484c6e74b45 (diff) |
feature: use eleventyNavigation plugin for nav
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/base.njk | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/_includes/base.njk b/_includes/base.njk index c3602c7..6ff7553 100644 --- a/_includes/base.njk +++ b/_includes/base.njk @@ -2,7 +2,7 @@ title = "Starfall" --- <!doctype html> -<html lang=en._US dir=ltr> +<html lang=en-US dir=ltr> <title>{{ title }}</title> <meta charset=UTF-8> <meta name=robots content="noindex, nofollow"> @@ -13,9 +13,11 @@ title = "Starfall" <header> <h1>{{ title }}</h1> <nav aria-label=primary> - <ul> - <li><a href=/ class=active aria-current=page>Home</a> - <li><a href=https://git.starfall.systems>Git</a> + {% set navs = collections.all | eleventyNavigation %} + <ul>{%- for nav in navs %} + <li> + <a href="{{ nav.url }}"{% if nav.url == page.url %} class="active" aria-current="page"{% endif %}>{{ nav.title }}</a> + </li>{%- endfor %} </ul> </nav> </header> |