From 81d846f0d2b13ad4de9f1928a76a983f3b6111b5 Mon Sep 17 00:00:00 2001 From: night0721 Date: Thu, 14 Mar 2024 01:11:51 +0000 Subject: [PATCH] add repos main page and to menu --- config.toml | 11 ++++++++--- content/repos/_index.md | 5 +++++ content/{repo => repos}/auth.md | 0 content/{repo => repos}/based.md | 0 content/{repo => repos}/cath.md | 0 content/{repo => repos}/ccc.md | 0 content/{repo => repos}/lilase.md | 0 content/{repo => repos}/noted.md | 0 content/{repo => repos}/nxc-host.md | 0 content/{repo => repos}/nyx.md | 0 content/{repo => repos}/rush.md | 0 layouts/_default/list.html | 4 +++- layouts/shortcodes/repolist.html | 12 ++++++++++++ 13 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 content/repos/_index.md rename content/{repo => repos}/auth.md (100%) rename content/{repo => repos}/based.md (100%) rename content/{repo => repos}/cath.md (100%) rename content/{repo => repos}/ccc.md (100%) rename content/{repo => repos}/lilase.md (100%) rename content/{repo => repos}/noted.md (100%) rename content/{repo => repos}/nxc-host.md (100%) rename content/{repo => repos}/nyx.md (100%) rename content/{repo => repos}/rush.md (100%) create mode 100644 layouts/shortcodes/repolist.html diff --git a/config.toml b/config.toml index 272ce6d..65259b0 100644 --- a/config.toml +++ b/config.toml @@ -16,21 +16,26 @@ ignoreErrors = ["error-remote-getjson"] name = "Posts" url = "/posts" weight = 20 + + [[menu.main]] + name = "Repos" + url = "/repos" + weight = 30 [[menu.main]] name = "Contact" url = "/contact" - weight = 30 + weight = 40 [[menu.main]] name = "Links" url = "/links" - weight = 40 + weight = 50 [[menu.main]] name = "Bookmarks" url = "/bookmarks" - weight = 50 + weight = 60 [[menu.social]] name = "Codeberg" diff --git a/content/repos/_index.md b/content/repos/_index.md new file mode 100644 index 0000000..7b49a2a --- /dev/null +++ b/content/repos/_index.md @@ -0,0 +1,5 @@ +--- +title: "Repositories" +--- + +{{< repolist >}} diff --git a/content/repo/auth.md b/content/repos/auth.md similarity index 100% rename from content/repo/auth.md rename to content/repos/auth.md diff --git a/content/repo/based.md b/content/repos/based.md similarity index 100% rename from content/repo/based.md rename to content/repos/based.md diff --git a/content/repo/cath.md b/content/repos/cath.md similarity index 100% rename from content/repo/cath.md rename to content/repos/cath.md diff --git a/content/repo/ccc.md b/content/repos/ccc.md similarity index 100% rename from content/repo/ccc.md rename to content/repos/ccc.md diff --git a/content/repo/lilase.md b/content/repos/lilase.md similarity index 100% rename from content/repo/lilase.md rename to content/repos/lilase.md diff --git a/content/repo/noted.md b/content/repos/noted.md similarity index 100% rename from content/repo/noted.md rename to content/repos/noted.md diff --git a/content/repo/nxc-host.md b/content/repos/nxc-host.md similarity index 100% rename from content/repo/nxc-host.md rename to content/repos/nxc-host.md diff --git a/content/repo/nyx.md b/content/repos/nyx.md similarity index 100% rename from content/repo/nyx.md rename to content/repos/nyx.md diff --git a/content/repo/rush.md b/content/repos/rush.md similarity index 100% rename from content/repo/rush.md rename to content/repos/rush.md diff --git a/layouts/_default/list.html b/layouts/_default/list.html index a887132..69f71bf 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -4,6 +4,8 @@ {{ .Content }} -{{ partial "posts.html" . }} +{{ if eq .Section "posts" }} + {{ partial "posts.html" . }} +{{ end }} {{ partial "footer.html" . }} diff --git a/layouts/shortcodes/repolist.html b/layouts/shortcodes/repolist.html new file mode 100644 index 0000000..9fe8e7f --- /dev/null +++ b/layouts/shortcodes/repolist.html @@ -0,0 +1,12 @@ +