diff options
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] |
