aboutsummaryrefslogtreecommitdiff
path: root/templates/repo_tree_file.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo_tree_file.tmpl')
-rw-r--r--templates/repo_tree_file.tmpl3
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/repo_tree_file.tmpl b/templates/repo_tree_file.tmpl
index b0ce0f1..037a5af 100644
--- a/templates/repo_tree_file.tmpl
+++ b/templates/repo_tree_file.tmpl
@@ -3,6 +3,7 @@
SPDX-FileContributor: Runxi Yu <https://runxiyu.org>
*/}}
{{- define "repo_tree_file" -}}
+{{- $root := . -}}
<!DOCTYPE html>
<html lang="en">
<head>
@@ -14,7 +15,7 @@
{{- template "header" . -}}
<div class="padding">
<p>
- /{{ .path_spec }} (<a href="/{{ template "group_path_plain" .group_path }}/:/repos/{{ .repo_name }}/raw/{{ .path_spec }}{{ if .ref_type }}?{{ .ref_type }}={{ .ref_name }}{{ end }}">raw</a>)
+ /{{ .path_spec }} (<a href="/{{ template "group_path_plain" .group_path }}/:/repos/{{ .repo_name }}/raw/{{ .path_spec }}{{- template "ref_query" $root -}}">raw</a>)
</p>
{{- .file_contents -}}
</div>