From 6af184b724888895f7a34c3ea86282a7a0e40127 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Fri, 16 Jul 2021 19:48:07 +0000 Subject: [PATCH] add an alt text for the git clone command --- files.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files.go b/files.go index 0565d26..faa392e 100644 --- a/files.go +++ b/files.go @@ -116,8 +116,10 @@ func createIndexFile() { indexFile, err := os.Create(filepath.Join(distPath, "index.gmi")) check(err) - if cloneURL != "" { - indexFile.WriteString("```\ngit clone " + strings.TrimSpace(cloneURL) + "\n```\n\n") + url := strings.TrimSpace(cloneURL) + if url != "" { + descr := "Command to clone this repository" + fmt.Fprintf(indexFile, "```%s\ngit clone %s\n```\n\n", descr, url) } indexFile.WriteString("=> " + commitsSubPath + "/\n") -- 2.38.5