this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix use leaflet title as filename

Signed-off-by: Marius Kimmina <mar.kimmina@gmail.com>

+9 -2
+2 -1
cmd/leaflet-hugo-sync/main.go
··· 160 160 postData := generator.PostData{ 161 161 Title: doc.Title, 162 162 CreatedAt: doc.PublishedAt, 163 - Slug: filename, 163 + Slug: slug, 164 + Filename: filename, 164 165 Handle: cfg.Source.Handle, 165 166 OriginalURL: originalURL, 166 167 Content: finalContent,
+7 -1
internal/generator/hugo.go
··· 17 17 Title string 18 18 CreatedAt string 19 19 Slug string 20 + Filename string 20 21 Handle string 21 22 OriginalURL string 22 23 Content string ··· 59 60 return err 60 61 } 61 62 62 - fileName := data.Slug + ".md" 63 + // Use Filename if provided, otherwise fall back to Slug 64 + filename := data.Filename 65 + if filename == "" { 66 + filename = data.Slug 67 + } 68 + fileName := filename + ".md" 63 69 filePath := filepath.Join(g.Cfg.Output.PostsDir, fileName) 64 70 65 71 fullContent := bufFM.String() + "\n" + bufContent.String()