From 90fa2795ad177b9add2fe46382576993e96ece4b Mon Sep 17 00:00:00 2001 From: tjpcc Date: Sat, 16 Sep 2023 20:43:19 -0600 Subject: Initial commit Gemini repository browsing --- templates/repo_home.gmi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 templates/repo_home.gmi (limited to 'templates/repo_home.gmi') diff --git a/templates/repo_home.gmi b/templates/repo_home.gmi new file mode 100644 index 0000000..a2af514 --- /dev/null +++ b/templates/repo_home.gmi @@ -0,0 +1,28 @@ +# {{.Repo.Name}} + +{{.Repo.Description}} + +=> ./branches ⌥ Branches +=> ./tags 🏷️Tags +=> ./refs/HEAD/tree/ 📄 Files + +## Latest Commits + +{{ with .Repo.Commits .Ctx "HEAD" 5 -}} +{{ range . -}} +=> ./refs/{{.Hash}}/ {{.ShortMessage}} +{{ end -}} +{{ if len . | eq 0 -}} +(no commits to show) +{{ end -}} +{{ end }} + +{{ with .Repo.Readme .Ctx "HEAD" -}} +{{ if len .RawContents | ne 0 -}} +## {{.Filename}} + +```{{.Filename}} contents +{{.EscapedContents}} +``` +{{ end -}} +{{ end }} -- cgit v1.2.3