summaryrefslogtreecommitdiff
path: root/commit.go
diff options
context:
space:
mode:
authorAnton Medvedev <anton@medv.io>2025-12-07 20:12:04 +0100
committerAnton Medvedev <anton@medv.io>2025-12-07 20:12:04 +0100
commit4693364d59fce5d61cff503eae988edb57f4c1e9 (patch)
treed411bc37d595a024ee2cf54f1649dc9be7a847d9 /commit.go
parent59608fd41c1ec2bdab8dfebbb1786bd84d8b5fa1 (diff)
Replace `CurrentRef` with `CurrentRefDir` in layout parameters
Diffstat (limited to 'commit.go')
-rw-r--r--commit.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/commit.go b/commit.go
index ef18913..028e8a9 100644
--- a/commit.go
+++ b/commit.go
@@ -236,12 +236,12 @@ func generateCommitPage(commit git.Commit, params Params) error {
err = templates.CommitTemplate.ExecuteTemplate(f, "layout.gohtml", templates.CommitParams{
LayoutParams: templates.LayoutParams{
- Title: fmt.Sprintf("%s %s %s@%s", commit.Subject, dot, params.Name, commit.ShortHash),
- Name: params.Name,
- Dark: params.Dark,
- RootHref: rootHref,
- CurrentRef: currentRef,
- Selected: "commits",
+ Title: fmt.Sprintf("%s %s %s@%s", commit.Subject, dot, params.Name, commit.ShortHash),
+ Name: params.Name,
+ Dark: params.Dark,
+ RootHref: rootHref,
+ CurrentRefDir: currentRef.DirName(),
+ Selected: "commits",
},
Commit: commit,
DiffCSS: template.CSS(cssBuf.String()),