all repos — homestead @ 431e351c78000ccd0d6bf035b4cd1092a7744d85

Code for my website

show date last updated for posts with multiple commits

Alan Pearce
commit

431e351c78000ccd0d6bf035b4cd1092a7744d85

parent

677f6211540940a1bdccb07cae059b4343807f1a

1 file changed, 6 insertions(+), 5 deletions(-)

changed files
M internal/builder/builder.gointernal/builder/builder.go
@@ -2,7 +2,6 @@ package builder
import ( "context" - "database/sql" "fmt" "io" "os"
@@ -17,6 +16,7 @@ "go.alanpearce.eu/website/internal/content"
"go.alanpearce.eu/website/internal/sitemap" "go.alanpearce.eu/website/internal/storage" "go.alanpearce.eu/website/internal/storage/files" + "go.alanpearce.eu/website/internal/vcs" "go.alanpearce.eu/website/templates" "go.alanpearce.eu/x/log"
@@ -25,10 +25,10 @@ "gitlab.com/tozd/go/errors"
) type Options struct { - Source string `conf:"default:.,short:s,flag:src"` - Destination string `conf:"default:public,short:d,flag:dest"` - Development bool `conf:"default:false,flag:dev"` - DB *sql.DB + Source string `conf:"default:.,short:s,flag:src"` + Destination string `conf:"default:public,short:d,flag:dest"` + Development bool `conf:"default:false,flag:dev"` + Repo *vcs.Repository `conf:"-"` } type Result struct {
@@ -78,6 +78,7 @@ log.Debug("reading posts", "source", options.Source)
cc, err := content.NewContentCollection(&content.Config{ Root: options.Source, PostDir: "post", + Repo: options.Repo, }, log.Named("content")) if err != nil { return nil, err