all repos — homestead @ f28244740352b116eb43defb4b12a9656ea532a2

Code for my website

show post changelogs

Alan Pearce
commit

f28244740352b116eb43defb4b12a9656ea532a2

parent

02344e6cb41515516464de403e2eae1caac81e5c

1 file changed, 24 insertions(+), 0 deletions(-)

changed files
M templates/post.gotemplates/post.go
@@ -4,6 +4,7 @@ import (
"time" "go.alanpearce.eu/homestead/internal/content" + "go.alanpearce.eu/homestead/internal/vcs" g "maragu.dev/gomponents" . "maragu.dev/gomponents/html"
@@ -34,6 +35,29 @@ Ul(Class("p-categories tags"),
g.Map(post.Taxonomies.Tags, func(tag string) g.Node { return Li( tagLink(tag, Class("p-category")), + ) + }), + ), + ), + Details(Class("changelog"), + Summary(g.Text("Changelog")), + Ul( + g.Map(post.Commits, func(commit *vcs.Commit) g.Node { + return Li( + TitleAttr(commit.Description), + postDate(commit.Date, ""), + g.Text(" "), + A( + Href(commit.Link.String()), + g.Text(commit.Summary), + ), + g.Text(" "), + g.If( + len(commit.Description) > 0, + Small( + g.Text(" …"), + ), + ), ) }), ),