diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-12 02:59:53 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-12 02:59:53 +0800 |
commit | c810b44273c40fdcf66524073ef0a2980c8a3517 (patch) | |
tree | d8d118e70596762771a3b9cb35899a3190986f44 /templates/repo_tree_file.html.tmpl | |
parent | README.md: Protocols and user interfaces (diff) | |
download | forge-c810b44273c40fdcf66524073ef0a2980c8a3517.tar.gz forge-c810b44273c40fdcf66524073ef0a2980c8a3517.tar.zst forge-c810b44273c40fdcf66524073ef0a2980c8a3517.zip |
repo_tree_file: Don't treespec when it's head
Diffstat (limited to 'templates/repo_tree_file.html.tmpl')
-rw-r--r-- | templates/repo_tree_file.html.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo_tree_file.html.tmpl b/templates/repo_tree_file.html.tmpl index cf82c44..90ce5ad 100644 --- a/templates/repo_tree_file.html.tmpl +++ b/templates/repo_tree_file.html.tmpl @@ -11,7 +11,7 @@ {{ template "repo_header" . }} </header> <p> - /{{ .path_spec }} (<a href="/g/{{ .group_name }}/repos/{{ .repo_name }}/raw/{{ .path_spec }}?{{ .ref_type }}={{ .ref }}">raw</a>) + /{{ .path_spec }} (<a href="/g/{{ .group_name }}/repos/{{ .repo_name }}/raw/{{ .path_spec }}{{ if not (eq .ref_type "head") }}?{{ .ref_type }}={{ .ref }}{{ end }}">raw</a>) </p> {{ .file_contents }} <footer> |