MCPcopy Index your code
hub / github.com/github/docs / buildMiniTocItems

Function buildMiniTocItems

middleware/render-page.js:23–33  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

21}
22
23async 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
35export default async function renderPage(req, res) {
36 const { context } = req

Callers 1

renderPageFunction · 0.85

Calls 1

getMiniTocItemsFunction · 0.85

Tested by

no test coverage detected