summaryrefslogtreecommitdiff
path: root/templates/tree.gmi
diff options
context:
space:
mode:
Diffstat (limited to 'templates/tree.gmi')
-rw-r--r--templates/tree.gmi6
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/tree.gmi b/templates/tree.gmi
new file mode 100644
index 0000000..35d0d02
--- /dev/null
+++ b/templates/tree.gmi
@@ -0,0 +1,6 @@
+# {{.Params.ref}}:{{ if ne .Params.path "" }}{{.Params.path}}{{ else }}/{{ end }}
+
+=> ../ {{ if ne .Params.path "" }}../{{ else }}Commit{{ end }}
+{{ range .Repo.Tree .Ctx .Params.ref .Params.path -}}
+=> ./{{.Path}}{{if eq .Type "tree"}}/{{end}} {{if eq .Type "blob"}}📄{{else if eq .Type "tree"}}📂{{end}} {{.Path}}
+{{ end -}}