Install on Nuxt
On this page
The Nuxt module translates the pages that nuxt generate writes. It adds a copy of each page under a language prefix, such as /fr/. Each copy has the right lang and dir, hreflang tags, a canonical tag and the loader tag.
Setup#
- Add
@resilientlang/nuxtto themoduleslist innuxt.config.ts. - Add a
resilientLangsection with your source language, your site address, the folder of your published bundle and your public key. - Run
nuxt generate.
The module runs after Nuxt has written all pages. This comes from our own tests in a real Nuxt build. We could not find the build step it uses in Nuxt's or Nitro's documentation, so a Nuxt update could change it: verify. It does nothing in development. It does not touch a build for the Node server preset, because that build has no static pages.
What it checks#
The signature of the manifest is mandatory, and every file is checked against its checksum. A bad signature stops the build. If the files cannot be loaded at all, the build keeps your source pages and warns.
Hydration#
Translated copies get no framework scripts by default, so nothing can hydrate over the translation. They are plain static pages.
Not covered#
Pages made on demand are not prerendered. The module was tested inside a real Nuxt build, but no search-engine crawl has been done: OPEN. It is not published to npm: OPEN.