You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/1.docs/1.getting-started/3.deploy.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,7 +139,6 @@ You only need to create these resources if you have explicitly enabled them in t
139
139
Then, create a [Cloudflare Pages project](https://dash.cloudflare.com/?to=/:account/pages/new/provider/github) and link your GitHub or Gitlab repository and choose the Nuxt Framework preset in the build settings.
140
140
141
141
Once your project is created, open the `Settings -> Functions` tab and set:
142
-
- Placement: Smart
143
142
- KV namespace bindings
144
143
- Set the variable name as `KV` and select your KV namespace created
145
144
- Set the variable name as `CACHE` and select your KV namespace for caching created
@@ -149,7 +148,10 @@ Once your project is created, open the `Settings -> Functions` tab and set:
149
148
- Set the variable name as `DB` and select your D1 database created
150
149
- AI bindings
151
150
- Set the variable name as `AI`
152
-
151
+
- Browser bindings
152
+
- Set the variable name as `BROWSER`
153
+
- Compatibility flags
154
+
- Add the `nodejs_compat` and `nodejs_als` flags
153
155
154
156
Go back to the `Deployment` tab and retry the last deployment by clicking on `...` then `Retry deployment`.
To avoid having any styling issues, we recommend to keep your `app.vue` as minimal as possible:
302
+
303
+
```vue [app.vue]
304
+
<template>
305
+
<NuxtLayout>
306
+
<NuxtPage />
307
+
</NuxtLayout>
308
+
</template>
309
+
```
310
+
311
+
And move most of your head management, style & HTML structure in [`layouts/default.vue`](https://nuxt.com/docs/guide/directory-structure/layouts#default-layout).
312
+
313
+
Lastly, we need to create a `layouts/blank.vue` to avoid having any layout on our `_invoice` page:
314
+
315
+
```vue [layouts/blank.vue]
316
+
<template>
317
+
<slot />
318
+
</template>
319
+
```
320
+
321
+
This will ensure that no header, footer or any other layout elements are rendered.
322
+
323
+
Now, let's create our server route to generate the PDF:
<UAlertv-if="framework"class="mt-4":class="{ 'animate-pulse': loading }":title="`This website is made with ${framework}`"color="white"icon="i-ph-code-duotone" />
0 commit comments