~artemis/cap

d6c191400d22b49ecb2164500f452b4c209e7460 — Artémis 9 months ago 09181ac
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"
				}