Skip to content

Commit

Permalink
docs: further mention the #1476 ticket/workaround (#1529)
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Mar 1, 2024
1 parent 9fa3358 commit 050df94
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
6 changes: 6 additions & 0 deletions docs/pages/pre-rendering/+Page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ The only difference between SSG and SSR is *when* the HTML is rendered:

## See also

Related docs:

- <Link href="/static-hosts" />
- <Link href="/ssr" />

Pre-rendering options:

- <Link href="/prerender" />
- <Link href="/command-prerender" />
- <Link href="/prerender-programmatic" />
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/pre-rendering/PreRenderDynamicRoutes.mdx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
> Instead of providing a list of URLs, if you want a parameterized route to be resolved dynamically on the client-side, then see the workaround at [#1476 - Pre-rendered dynamic routes (static host deployment)](https://github.com/vikejs/vike/issues/1476).
> Instead of providing a list of URLs, if you want a parameterized route to be resolved dynamically on the client-side, see the workaround at [#1476 - Pre-rendered dynamic routes (static host deployment)](https://github.com/vikejs/vike/issues/1476).
12 changes: 8 additions & 4 deletions docs/pages/prerender/+Page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,17 @@ const onBeforePrerenderStart = someCondition()

`boolean` (default: `false`)

Allow only some of our pages to be pre-rendered.
Allow only some of your pages to be pre-rendered.

This setting doesn't affect the pre-rendering process: it merely suppresses the warnings when some of our pages cannot be pre-rendered.
This setting doesn't affect the pre-rendering process: it merely suppresses the warning that some pages aren't pre-rendered.

> As explained in <Link href="/pre-rendering" />, if we don't pre-render all pages, then we need a production server. By using <Link text={<code>vite-plugin-vercel</code>} href="/vercel#vite-plugin-vercel" />, we can still statically deploy our pre-rendered pages while using a production server for our non-pre-rendered pages.
> As explained in <Link href="/pre-rendering" />, if you don't pre-render *all* your pages then you need a production server.
>
> That said, if you cannot or don't want to pre-render all your pages while still deploying to a <Link href="/static-hosts">static host</Link>, then see the workaround at [#1476 - Pre-rendered dynamic routes (static host deployment)](https://github.com/vikejs/vike/issues/1476).
>
> Also, by using <Link text={<code>vite-plugin-vercel</code>} href="/vercel#vite-plugin-vercel" />, you can statically deploy your pre-rendered pages while using a production server for your non-pre-rendered pages.
> Vike shows a warning that a page cannot be pre-rendered, when the page has a parameterized route (e.g. a <Link text="Route String" href="/route-string" /> `/movie/@movieId`, or a <Link text="Route Function" href="/route-function" />), and there isn't any <Link text={<><code>onBeforePrerenderStart()</code> hook</>} href="/onBeforePrerenderStart" /> that provides at least one URL matching the page's route (e.g. `/movie/42`).
> Vike shows a warning that a page cannot be pre-rendered when the page has a parameterized route (e.g. a <Link text="Route String" href="/route-string" /> `/movie/@movieId`, or a <Link text="Route Function" href="/route-function" />) while there isn't any <Link text={<><code>onBeforePrerenderStart()</code> hook</>} href="/onBeforePrerenderStart" /> that provides at least one URL matching the page's route (e.g. `/movie/42`).

### `noExtraDir`
Expand Down

0 comments on commit 050df94

Please sign in to comment.