diff options
author | Alan Pearce | 2024-04-24 18:01:15 +0200 |
---|---|---|
committer | Alan Pearce | 2024-04-24 18:01:15 +0200 |
commit | bbfe6055609c4e7401f27d3dd4a5aa9c0a5242d6 (patch) | |
tree | e81aefa6234cd5205638a7e7e6a4890285070ecd /cmd/build/build.go | |
parent | d2a1791fa01fcf4316f80fdc3be241f2c6fd4ac9 (diff) | |
download | website-bbfe6055609c4e7401f27d3dd4a5aa9c0a5242d6.tar.lz website-bbfe6055609c4e7401f27d3dd4a5aa9c0a5242d6.tar.zst website-bbfe6055609c4e7401f27d3dd4a5aa9c0a5242d6.zip |
add count
Diffstat (limited to 'cmd/build/build.go')
-rw-r--r-- | cmd/build/build.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/build/build.go b/cmd/build/build.go index 9b58095..21eedbd 100644 --- a/cmd/build/build.go +++ b/cmd/build/build.go @@ -78,7 +78,7 @@ func build(outDir string, config config.Config) error { return errors.WithMessage(err, "could not create directory for tags") } slog.Debug("rendering tags list") - output, err := renderTags(tags, config) + output, err := renderTags(tags, config, "/tags") if err != nil { return errors.WithMessage(err, "could not render tags") } @@ -97,7 +97,7 @@ func build(outDir string, config config.Config) error { return errors.WithMessage(err, "could not create directory") } slog.Debug("rendering tags page", "tag", tag) - output, err := renderListPage(tag, config, matchingPosts) + output, err := renderListPage(tag, config, matchingPosts, "/tags/"+tag) if err != nil { return errors.WithMessage(err, "could not render tag page") } @@ -116,7 +116,7 @@ func build(outDir string, config config.Config) error { } slog.Debug("rendering list page") - listPage, err := renderListPage("", config, posts) + listPage, err := renderListPage("", config, posts, "/post") if err != nil { return errors.WithMessage(err, "could not render list page") } @@ -143,7 +143,7 @@ func build(outDir string, config config.Config) error { } slog.Debug("rendering homepage") - homePage, err := renderHomepage(config, posts) + homePage, err := renderHomepage(config, posts, "/") if err != nil { return errors.WithMessage(err, "could not render homepage") } @@ -152,7 +152,7 @@ func build(outDir string, config config.Config) error { } slog.Debug("rendering 404 page") - notFound, err := render404(config) + notFound, err := render404(config, "/404.html") if err != nil { return errors.WithMessage(err, "could not render 404 page") } |