(req)
| 11 | import { defaultCacheControl } from './cache-control.js' |
| 12 | |
| 13 | async function buildRenderedPage(req) { |
| 14 | const { context } = req |
| 15 | const { page } = context |
| 16 | const path = req.pagePath || req.path |
| 17 | |
| 18 | const pageRenderTimed = statsd.asyncTimer(page.render, 'middleware.render_page', [`path:${path}`]) |
| 19 | |
| 20 | return await pageRenderTimed(context) |
| 21 | } |
| 22 | |
| 23 | async function buildMiniTocItems(req) { |
| 24 | const { context } = req |