summaryrefslogtreecommitdiff
path: root/templates/ref.gmi
diff options
context:
space:
mode:
Diffstat (limited to 'templates/ref.gmi')
-rw-r--r--templates/ref.gmi49
1 files changed, 49 insertions, 0 deletions
diff --git a/templates/ref.gmi b/templates/ref.gmi
new file mode 100644
index 0000000..e185ef1
--- /dev/null
+++ b/templates/ref.gmi
@@ -0,0 +1,49 @@
+# {{.Repo.Name}} {{slice .Params.ref 0 8}}
+
+{{ with .Repo.Commit .Ctx .Params.ref -}}
+## {{.ShortMessage}}
+
+{{ with .RestOfMessage -}}
+{{ if ne . "" -}}
+{{.}}
+
+{{ end -}}
+{{ end -}}
+=> ../../ 🗂️ Repository
+=> ./tree/ 📄 Files
+{{ if ne .Parents nil -}}
+=> ../../diff/{{.Hash}}^/{{.Hash}} 🔩 Full Diff
+{{ else -}}
+=> ../../diff/4b825dc642cb6eb9a060e54bf8d69288fbee4904/{{.Hash}} 🔩 Full Diff
+{{ end -}}
+{{ range .Parents -}}
+=> ../{{.}}/ 👤 Parent {{slice . 0 8}}
+{{ end -}}
+{{ range .Repo.Refs $.Ctx -}}
+{{ if .IsTag -}}
+{{ if eq $.Params.ref .Hash -}}
+=> ../{{.Hash}}/ 🏷️ {{.ShortName}}
+{{ end -}}
+{{ end -}}
+{{ end }}
+
+### Authored
+=> mailto:{{.AuthorEmail}} {{.AuthorName}}
+{{.AuthorDate.Format "Mon Jan _2 15:04:05 MST 2006"}}
+
+### Committed
+=> mailto:{{.CommitterEmail}} {{.CommitterName}}
+{{.CommitDate.Format "Mon Jan _2 15:04:05 MST 2006"}}
+
+{{ if ne .Parents nil -}}
+{{ with index .Parents 0 -}}
+```diffstat
+{{$.Repo.Diffstat $.Ctx . $.Params.ref}}
+```
+{{ end -}}
+{{ else -}}
+```diffstat
+{{$.Repo.Diffstat $.Ctx "4b825dc642cb6eb9a060e54bf8d69288fbee4904" $.Params.ref}}
+```
+{{ end -}}
+{{ end -}}