Nuxt/docs/3.api/3.utils/prerender-routes.md
Sébastien Chopin f26a801775
docs: update to new website (#23743)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
2023-10-18 12:59:43 +02:00

606 B

title description links
prerenderRoutes prerenderRoutes hints to Nitro to prerender an additional route.
label icon to size
Source i-simple-icons-github https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/ssr.ts xs

When prerendering, you can hint to Nitro to prerender additional paths, even if their URLs do not show up in the HTML of the generated page.

const route = useRoute()

prerenderRoutes('/')
prerenderRoutes(['/', '/about'])

::callout In the browser, or if called outside prerendering, prerenderRoutes will have no effect. ::