feat: edit shortcuts

This commit is contained in:
NGPixel
2022-09-20 16:55:05 -04:00
parent fa35f3a254
commit 8715cd69b2
10 changed files with 246 additions and 10 deletions

View File

@@ -542,13 +542,18 @@ router.get('/*', async (req, res, next) => {
})
}
// -> Page Filename (for edit on external repo button)
let pageFilename = WIKI.config.lang.namespacing ? `${pageArgs.locale}/${page.path}` : page.path
pageFilename += page.contentType === 'markdown' ? '.md' : '.html'
// -> Render view
res.render('page', {
page,
sidebar,
injectCode,
comments: commentTmpl,
effectivePermissions
effectivePermissions,
pageFilename
})
}
} else if (pageArgs.path === 'home') {