mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
404 B
404 B
astro |
---|
minor |
Adds a new property isPrerendered
to the globals Astro
and APIContext
. This boolean value represents whether or not the current page is prerendered:
---
// src/pages/index.astro
export const prerender = true
---
// src/middleware.js
export const onRequest = (ctx, next) => {
console.log(ctx.isPrerendered) // it will log true
return next()
}