(req)
| 21 | } |
| 22 | |
| 23 | async function buildMiniTocItems(req) { |
| 24 | const { context } = req |
| 25 | const { page } = context |
| 26 | |
| 27 | // get mini TOC items on articles |
| 28 | if (!page.showMiniToc) { |
| 29 | return |
| 30 | } |
| 31 | |
| 32 | return getMiniTocItems(context.renderedPage, page.miniTocMaxHeadingLevel, '') |
| 33 | } |
| 34 | |
| 35 | export default async function renderPage(req, res) { |
| 36 | const { context } = req |
no test coverage detected