summaryrefslogtreecommitdiffstats
path: root/lib/parse
diff options
context:
space:
mode:
Diffstat (limited to 'lib/parse')
-rw-r--r--lib/parse/navigation.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/parse/navigation.js b/lib/parse/navigation.js
index 2680251..abe0ee2 100644
--- a/lib/parse/navigation.js
+++ b/lib/parse/navigation.js
@@ -31,6 +31,9 @@ function navigation(summary, files) {
// Walk the chapter/article tree and create navigation entires
_.each(summary.chapters, function(chapter, idx, chapters) {
+ // Skip if no path
+ if(!chapter.path) return;
+
var currentChapter = clean(chapter);
var prevChapter = (idx-1 < 0) ? README_NAV : chapters[idx-1];
var nextChapter = (idx+1 >= chapters.length) ? null : chapters[idx+1];
@@ -49,6 +52,8 @@ function navigation(summary, files) {
// Check a chapter's articles
_.each(chapter.articles, function(article, _idx, articles) {
+ // Skip if no path
+ if(!article.path) return;
var prev = (_idx-1 < 0) ? currentChapter : clean(articles[_idx-1]);
var next = (_idx+1 >= articles.length) ? nextChapter : clean(articles[_idx+1]);