blob: b9fc3515a111832f4cf6266803e3079d63b82d0d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
---
'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()
}
```
|