refactor: making the "is it index" check simpler
1 files changed, 2 insertions(+), 1 deletions(-) M loader.go
M loader.go => loader.go +2 -1
@@ 128,7 128,8 @@ func ListFiles(root string, idx *domain.Index) (domain.Section, error) { page.RelativePath = relativeToRoot idx.Files[path] = domain.ObjectTypePage if util.Includes(info.Name(), "index.gmi", "index.md", "index.html") { name = strings.TrimSuffix(info.Name(), ext) if name == "index" { if page.Template == "" { page.Template = "section" }