diff options
-rw-r--r-- | templates/ref.gmi | 4 | ||||
-rw-r--r-- | templates/tree.gmi | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/templates/ref.gmi b/templates/ref.gmi index e185ef1..909690f 100644 --- a/templates/ref.gmi +++ b/templates/ref.gmi @@ -1,6 +1,6 @@ -# {{.Repo.Name}} {{slice .Params.ref 0 8}} - {{ with .Repo.Commit .Ctx .Params.ref -}} +# {{.Repo.Name}} {{slice .Hash 0 8}} + ## {{.ShortMessage}} {{ with .RestOfMessage -}} diff --git a/templates/tree.gmi b/templates/tree.gmi index 35d0d02..b686c2c 100644 --- a/templates/tree.gmi +++ b/templates/tree.gmi @@ -1,5 +1,7 @@ -# {{.Params.ref}}:{{ if ne .Params.path "" }}{{.Params.path}}{{ else }}/{{ end }} +{{ with .Repo.Commit .Ctx .Params.ref -}} +# {{slice .Hash 0 8}}:{{ if ne $.Params.path "" }}{{$.Params.path}}{{ else }}/{{ end }} +{{ 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}} |