fix link generation in repos under categoies
1 file changed, 6 insertions(+), 6 deletions(-)
changed files
M templates/commit.go → templates/commit.go
@@ -25,14 +25,14 @@ CommitInfo(diff.Commit.Author), ), Div( Strong(g.Text("commit")), - P(A(Href(fmt.Sprintf("/%s/commit/%s", data.Repo.Name, diff.Commit.This)), + P(A(Href(fmt.Sprintf("/%s/commit/%s", data.Repo.Slug, diff.Commit.This)), Class("commit-hash"), g.Text(diff.Commit.This))), ), g.If(diff.Commit.Parent != "", Div( Strong(g.Text("parent")), - P(A(Href(fmt.Sprintf("/%s/commit/%s", data.Repo.Name, diff.Commit.Parent)), + P(A(Href(fmt.Sprintf("/%s/commit/%s", data.Repo.Slug, diff.Commit.Parent)), Class("commit-hash"), g.Text(diff.Commit.Parent))), ),@@ -49,7 +49,7 @@ Ul(g.Map(diff.Diff, func(d git.Diff) g.Node { return Li( A( Href( - fmt.Sprintf("/%s/commit/%s/%s", data.Repo.Name, diff.Commit.This, d.Name.New), + fmt.Sprintf("/%s/commit/%s/%s", data.Repo.Slug, diff.Commit.This, d.Name.New), ), g.Text(d.Name.New), ),@@ -74,7 +74,7 @@ g.If(d.Name.Old != "", g.Group{ A( Href( - fmt.Sprintf("/%s/blob/%s/%s", data.Repo.Name, diff.Commit.Parent, d.Name.Old), + fmt.Sprintf("/%s/blob/%s/%s", data.Repo.Slug, diff.Commit.Parent, d.Name.Old), ), g.Text(d.Name.Old), ),@@ -85,7 +85,7 @@ A( Href( fmt.Sprintf( "/%s/blob/%s/%s", - data.Repo.Name, + data.Repo.Slug, diff.Commit.This, d.Name.New, ),@@ -95,7 +95,7 @@ ), }, ), }, - A(Href(fmt.Sprintf("/%s/blob/%s/%s", data.Repo.Name, diff.Commit.This, d.Name.New)), + A(Href(fmt.Sprintf("/%s/blob/%s/%s", data.Repo.Slug, diff.Commit.This, d.Name.New)), g.Text(d.Name.New)), ), g.If(d.IsBinary,