show date last updated for posts with multiple commits
1 file changed, 6 insertions(+), 5 deletions(-)
changed files
M internal/builder/builder.go → internal/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