Prevent rendering _index.gmi.md as posts

This commit is contained in:
Timur Demin 2020-11-20 04:17:20 +05:00
parent 1f5257ac90
commit 2211c5ffdd
No known key found for this signature in database
GPG key ID: 9EDF3F9D9286FA20

View file

@ -198,7 +198,7 @@ func main() {
if err != nil {
return err
}
if n := info.Name(); info.IsDir() || !strings.HasSuffix(n, ".md") || n == "_index.md" {
if n := info.Name(); info.IsDir() || !strings.HasSuffix(n, ".md") || n == "_index.md" || n == indexMdFilename {
return nil
}
fileContent, err := ioutil.ReadFile(path)