diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-12-12 20:15:12 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-12-12 20:15:12 +0100 |
| commit | 517d586fa225181d0f6fd3a36d7b5211b0ef0580 (patch) | |
| tree | b3b57c09eb234878297d694d466e5a402865d9a9 /backend | |
| parent | 3be95b54d9034475e4100701a5635a91f47386f3 (diff) | |
feat(backend): ignore backup (.bp) file
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/section.go | 6 |
1 files changed, 5 insertions, 1 deletions
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] |
