move navbar items to yaml file

This commit is contained in:
Cheri 2024-11-28 21:53:50 +02:00
parent 00ff630785
commit 85b267a33d
2 changed files with 15 additions and 5 deletions

12
src/_data/navigation.yaml Normal file
View file

@ -0,0 +1,12 @@
---
items:
- text: about me
url: "/about/"
- text: contact
url: "/contact/"
- text: git
url: "https://git.snug.moe/cheri"
- text: rss
url: "/feed.rss"
- text: posts
url: "/posts/"

View file

@ -27,11 +27,9 @@
</div> </div>
<div class="nav-right"> <div class="nav-right">
<ul> <ul>
<li><a href="/about/">about me</a></li> {% for item in navigation.items %}
<li><a href="/contact/">contact</a></li> <li><a href="{{item.url}}">{{item.text}}</a></li>
<li><a href="https://git.snug.moe/cheri">git</a></li> {% endfor %}
<li><a href="/feed.rss">rss</a></li>
<li><a href="/posts/">posts</a></li>
</ul> </ul>
</div> </div>
</nav> </nav>