From b1677cfd7cb2a30afaf581d4477e9c00d62a73c2 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 25 Jan 2025 00:04:17 +0100 Subject: fix post URL generation --- internal/content/posts.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/content/posts.go b/internal/content/posts.go index 467f36f..f8e2d16 100644 --- a/internal/content/posts.go +++ b/internal/content/posts.go @@ -99,8 +99,8 @@ func ReadPosts(config *Config, log *log.Logger) ([]Post, Tags, error) { fn := f.Name() if !f.IsDir() && path.Ext(fn) == ".md" { output := path.Join(config.InputDir, outputReplacer.Replace(fn)) - url := urlReplacer.Replace(strings.TrimPrefix("/", fn)) - log.Debug("reading post", "post", fn) + url := path.Join("/", config.InputDir, urlReplacer.Replace(fn)) + "/" + log.Debug("reading post", "post", fn, "url", url) matter, content, err := GetPost(path.Join(subdir, fn)) if err != nil { return nil, nil, err -- cgit 1.4.1