0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
astro/.changeset/long-lions-do.md
Florian Lefebvre 0a269b63e5 fix: changelog
2024-09-09 16:43:51 +02:00

22 lines
404 B
Markdown

---
'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:
```astro
---
// src/pages/index.astro
export const prerender = true
---
```
```js
// src/middleware.js
export const onRequest = (ctx, next) => {
console.log(ctx.isPrerendered) // it will log true
return next()
}
```