Add human-readable sitemap

This commit is contained in:
Sven Wehrend 2025-06-28 16:24:37 +02:00
parent f2c703e155
commit dcf89964d8
5 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,4 @@
---
title: "Sitemap"
layout: "sitemap"
---

View File

@ -0,0 +1,4 @@
---
title: "Sitemap"
layout: "sitemap"
---

View File

@ -0,0 +1,4 @@
---
title: "Sitemap"
layout: "sitemap"
---

View File

@ -36,6 +36,23 @@ enableGitInfo = true
contentDir = 'content.he'
languageDirection = 'rtl'
weight = 3
[[languages.en.menu.before]]
name = "Sitemap (EN)"
url = "/sitemap/"
weight = 10
[[languages.zh.menu.before]]
name = "Sitemap (ZH)"
url = "/zh/sitemap/"
weight = 10
[[languages.he.menu.before]]
name = "Sitemap (HE)"
url = "/he/sitemap/"
weight = 10
[menu]
# [[menu.before]]

17
layouts/sitemap/list.html Normal file
View File

@ -0,0 +1,17 @@
{{ define "main" }}
<h1 class="text-3xl font-bold mb-4">Sitemap</h1>
<ul class="space-y-2">
{{ range sort .Site.RegularPages.ByDate.Reverse }}
{{ if eq .Lang $.Site.Language.Lang }}
<li>
<a href="{{ .RelPermalink }}" class="text-blue-600 hover:underline">
{{ .Title }}
</a>
<span class="text-gray-500 text-sm ml-2">
({{ .Date.Format "2006-01-02" }})
</span>
</li>
{{ end }}
{{ end }}
</ul>
{{ end }}