Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
unknwon committed Dec 19, 2015
1 parent 213e3d1 commit a56b875
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions models/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,32 @@ func initLangDocs(tocs map[string]*Toc, localRoot, lang string) {
toc := tocs[lang]

for _, dir := range toc.Nodes {
if !com.IsFile(dir.FileName) {
continue
}

if err := dir.ReloadContent(); err != nil {
log.Error("Fail to load doc file: %v", err)
continue
}

for _, file := range dir.Nodes {
if com.IsFile(file.FileName) {
if err := file.ReloadContent(); err != nil {
log.Error("Fail to load doc file: %v", err)
continue
}
if !com.IsFile(file.FileName) {
continue
}

if err := file.ReloadContent(); err != nil {
log.Error("Fail to load doc file: %v", err)
continue
}
}
}

for _, page := range toc.Pages {
if !com.IsFile(page.FileName) {
continue
}

if err := page.ReloadContent(); err != nil {
log.Error("Fail to load doc file: %v", err)
continue
Expand Down

0 comments on commit a56b875

Please sign in to comment.