File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 "net/http"
88 "net/http/httptest"
99 "net/url"
10+ "path/filepath"
1011 "strings"
1112 "sync"
1213
@@ -101,9 +102,9 @@ func (s *Site) checkContentPage(page *contentPageCheckData) (problems []string)
101102 }
102103
103104 if node .Type == blackfriday .Link {
104- // Require that relative paths link to the actual .md file, so that browsing
105- // docs on the file system works.
106- if isPathOnly && u .Path != "" && ! strings . HasSuffix (u .Path , ".md" ) {
105+ // Require that relative paths link to the actual .md file, i.e not the "foo" folder in the case of
106+ // of "foo/index.md", so that browsing docs on the file system works.
107+ if isPathOnly && u .Path != "" && filepath . Ext (u .Path ) == "" {
107108 problems = append (problems , fmt .Sprintf ("must link to .md file, not %s" , u .Path ))
108109 }
109110 }
You can’t perform that action at this time.
0 commit comments