From 517d586fa225181d0f6fd3a36d7b5211b0ef0580 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Fri, 12 Dec 2025 20:15:12 +0100 Subject: feat(backend): ignore backup (.bp) file --- backend/section.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/section.go b/backend/section.go index ff2cf43..e2150cb 100644 --- a/backend/section.go +++ b/backend/section.go @@ -110,7 +110,11 @@ func (s *Section) readDir(path string, dir []os.DirEntry) error { } } else { if !strings.HasSuffix(d.Name(), ".md") { - return fmt.Errorf("file %s is not a markdown file", d.Name()) + if strings.HasSuffix(d.Name(), ".bp") { + slog.Debug("ignoring backup file", "path", path+"/"+d.Name()) + continue + } + return fmt.Errorf("file %s is not a markdown file or a backup file", d.Name()) } slug := strings.TrimSuffix(p, ".md") sec, ok := sections[s.Name] -- cgit v1.2.3