# Nuxt





Nuxt can generate a fully static site using `nuxi generate`. This pre-renders all routes to HTML files.

Deploy [#deploy]

<Steps>
  <Step>
    Generate static files [#generate-static-files]

    ```bash
    npx nuxi generate
    ```

    This outputs to `.output/public/` by default.
  </Step>

  <Step>
    Deploy to Sample.app [#deploy-to-sampleapp]

    Since `.output/public/` is auto-detected, you can run:

    ```bash
    samplex deploy
    ```

    Or specify the directory explicitly:

    ```bash
    samplex deploy ./.output/public
    ```
  </Step>
</Steps>

<Callout type="warn">
  Use `nuxi generate`, not `nuxi build`. The `build` command creates a server bundle, while
  `generate` creates static files suitable for Sample.app.
</Callout>

Pre-rendering specific routes [#pre-rendering-specific-routes]

By default, Nuxt crawls your app and pre-renders all discovered routes. To control which routes get pre-rendered:

```ts title="nuxt.config.ts"
export default defineNuxtConfig({
  nitro: {
    prerender: {
      routes: ["/", "/about", "/blog"],
    },
  },
});
```

Limitations [#limitations]

Features that require a server won't work with static generation:

* Server API routes (`server/api/`)
* Server middleware
* Dynamic server-side rendering
