aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-10 22:33:44 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-10 22:33:44 +0800
commitc7407d31e0815768c27ad88c0e23d1aa4f5afad6 (patch)
treea5c493b516956cdfb5aa438a42064ca5cc55b91c
parentrender_readme: Use GitHub-flavored markdown (diff)
downloadforge-c7407d31e0815768c27ad88c0e23d1aa4f5afad6.tar.gz
forge-c7407d31e0815768c27ad88c0e23d1aa4f5afad6.tar.zst
forge-c7407d31e0815768c27ad88c0e23d1aa4f5afad6.zip
index: Categories -> groups again
Diffstat (limited to '')
-rw-r--r--handle_index.go8
-rw-r--r--templates/index.html.tmpl6
2 files changed, 7 insertions, 7 deletions
diff --git a/handle_index.go b/handle_index.go
index ebbc4e0..4301eed 100644
--- a/handle_index.go
+++ b/handle_index.go
@@ -10,15 +10,15 @@ func handle_index(w http.ResponseWriter, r *http.Request) {
entries, err := os.ReadDir(config.Git.Root)
if err != nil {
- _, _ = w.Write([]byte("Error listing categories: " + err.Error()))
+ _, _ = w.Write([]byte("Error listing groups: " + err.Error()))
return
}
- categories := []string{}
+ groups := []string{}
for _, entry := range entries {
- categories = append(categories, entry.Name())
+ groups = append(groups, entry.Name())
}
- data["categories"] = categories
+ data["groups"] = groups
err = templates.ExecuteTemplate(w, "index", data)
if err != nil {
diff --git a/templates/index.html.tmpl b/templates/index.html.tmpl
index 3f08355..5e0b427 100644
--- a/templates/index.html.tmpl
+++ b/templates/index.html.tmpl
@@ -3,15 +3,15 @@
<html>
<head>
{{ template "head_common" . }}
- <title>Categories &ndash; Lindenii Forge</title>
+ <title>Groups &ndash; Lindenii Forge</title>
</head>
<body class="index">
<div class="padding-wrapper">
<h1>
- Categories
+ Groups
</h1>
<ul>
- {{- range .categories }}
+ {{- range .groups }}
<li>
<a href="g/{{ . }}/repos/">{{ . }}</a>
</li>