diff options
| author | a73x <[email protected]> | 2024-08-27 20:42:31 +0100 |
|---|---|---|
| committer | a73x <[email protected]> | 2024-08-27 20:42:31 +0100 |
| commit | c161efdbe8deaaac3c8cd338dad1fd3f6c87724a (patch) | |
| tree | 4042761e3afc90407fac119f405008c8e8430062 /templates/layouts | |
| parent | ae184c88cf89c7b6d83343ff7b629d86ec7bc6cc (diff) | |
feat(templates): dynamic collection nav
Diffstat (limited to 'templates/layouts')
| -rw-r--r-- | templates/layouts/_default.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/layouts/_default.html b/templates/layouts/_default.html index 7679382..27cd916 100644 --- a/templates/layouts/_default.html +++ b/templates/layouts/_default.html @@ -61,7 +61,11 @@ <nav> <ul> <li><a href="/">home</a></li> - <li><a href="/posts">posts</a></li> + {{ range $key, $value := .Collections }} + {{if ne $key "all"}} + <li><a href="/{{$key}}">{{$key}}</a></li> + {{end}} + {{end}} </ul> </nav> {{ template "content" . }} |
