diff --git a/libs/entries.js b/libs/entries.js index 4f13e1f3..f2df24b4 100644 --- a/libs/entries.js +++ b/libs/entries.js @@ -321,7 +321,9 @@ module.exports = { return self.exists(entryPath).then((docExists) => { if (!docExists) { return self.makePersistent(entryPath, contents).then(() => { - return self.updateCache(entryPath) + return self.updateCache(entryPath).then(entry => { + return search.add(entry) + }) }) } else { return Promise.reject(new Error('Entry already exists!')) diff --git a/views/pages/view.pug b/views/pages/view.pug index 013d9db0..c9782462 100644 --- a/views/pages/view.pug +++ b/views/pages/view.pug @@ -61,9 +61,9 @@ block content aside.stickyscroll(data-margin-top=40) .sidebar-label i.icon-th-list - span Contents + span Page Contents ul.sidebar-menu - li: a(href='#root', title='Start') Start + li: a(href='#root', title='Top of Page') Top +tocMenu(pageData.tree) .column