diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-10 09:33:37 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-10 09:33:37 +0800 |
commit | a20fc6ee101bcf2a626c4b538f1820ca11022d4a (patch) | |
tree | 88701ccf1a171a01f45f25cd64369116c188c7fd /templates/repo_index.html | |
parent | *.go: Reformat code (diff) | |
download | forge-a20fc6ee101bcf2a626c4b538f1820ca11022d4a.tar.gz forge-a20fc6ee101bcf2a626c4b538f1820ca11022d4a.tar.zst forge-a20fc6ee101bcf2a626c4b538f1820ca11022d4a.zip |
repo_index: Add anchors to filenames in the tree listing
Diffstat (limited to '')
-rw-r--r-- | templates/repo_index.html | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/repo_index.html b/templates/repo_index.html index 866a020..cf1326f 100644 --- a/templates/repo_index.html +++ b/templates/repo_index.html @@ -42,10 +42,11 @@ </tr> </thead> <tbody> +{{- $ref := .ref }} {{- range .files }} <tr> <td class="file-mode">{{ .Mode }}</td> -<td class="file-name">{{ .Name }}</td> +<td class="file-name"><a href="tree/{{ $ref }}/{{ .Name }}">{{ .Name }}</a></td> <td class="file-size">{{ .Size }}</td> </tr> {{- end }} |