diff options
author | Alan Pearce | 2024-06-25 09:14:56 +0200 |
---|---|---|
committer | Alan Pearce | 2024-06-25 09:14:56 +0200 |
commit | becede4bfead952239b9cf7c8eb9fb96d01534ec (patch) | |
tree | 20cf7d880487d89bc7d1d2e09912409e1a8f4489 /internal/builder/builder.go | |
parent | 4f5ca39f582d83ded08a6e1cbf1a195141623b1c (diff) | |
download | website-becede4bfead952239b9cf7c8eb9fb96d01534ec.tar.lz website-becede4bfead952239b9cf7c8eb9fb96d01534ec.tar.zst website-becede4bfead952239b9cf7c8eb9fb96d01534ec.zip |
refactor/format
Diffstat (limited to 'internal/builder/builder.go')
-rw-r--r-- | internal/builder/builder.go | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/internal/builder/builder.go b/internal/builder/builder.go index 933679d..d2d86a6 100644 --- a/internal/builder/builder.go +++ b/internal/builder/builder.go @@ -137,7 +137,12 @@ func build(outDir string, config config.Config) (*Result, error) { return nil, errors.WithMessage(err, "could not create directory for tags") } log.Debug("rendering tags list") - if err := renderToFile(templates.TagsPage(config, "tags", mapset.Sorted(tags), "/tags"), publicDir, "tags", "index.html"); err != nil { + if err := renderToFile( + templates.TagsPage(config, "tags", mapset.Sorted(tags), "/tags"), + publicDir, + "tags", + "index.html", + ); err != nil { return nil, err } sitemap.AddPath("/tags/", lastMod) @@ -154,7 +159,13 @@ func build(outDir string, config config.Config) (*Result, error) { } log.Debug("rendering tags page", "tag", tag) url := "/tags/" + tag - if err := renderToFile(templates.TagPage(config, tag, matchingPosts, url), publicDir, "tags", tag, "index.html"); err != nil { + if err := renderToFile( + templates.TagPage(config, tag, matchingPosts, url), + publicDir, + "tags", + tag, + "index.html", + ); err != nil { return nil, err } sitemap.AddPath(url, matchingPosts[0].Date) @@ -271,5 +282,6 @@ func BuildSite(ioConfig IOConfig) (*Result, error) { } loadCSS() + return build(ioConfig.Destination, *config) } |