---
title: Static Site
contributors:
  - saisrikardumpeti
  - aendel
updated_at: '2023-10-11T15:09:55Z'
created_at: '2023-10-11T15:09:55Z'
---

import PackageManagerTabs from '~/components/package-manager-tabs/index.tsx';
import { Note } from '~/components/note/note';

# Static Site Adapter

Qwik's Static Site adapter helps to generate static html files which can be easily deployed to any cloud providers.

## Installation

To integrate the `ssg` adapter, use the `add` command:


<PackageManagerTabs>
<span q:slot="pnpm">
```shell
pnpm run qwik add ssg
```
</span>
<span q:slot="npm">
```shell
npm run qwik add ssg
```
</span>
<span q:slot="yarn">
```shell
yarn run qwik add ssg
```
</span>
<span q:slot="bun">
```shell
bun run qwik add ssg
```
</span>
</PackageManagerTabs>

Above command will create a directory at project root named `adapters/ssg/vite.config.ts` with the below code.

```ts title="adapters/ssg/vite.config.ts"
import { ssgAdapter } from "@qwik.dev/router/adapters/ssg/vite";
import { extendConfig } from '@qwik.dev/router';
import baseConfig from '../../vite.config.ts';

export default extendConfig(baseConfig, () => {
  return {
    build: {
      ssr: true,
      rollupOptions: {
        input: ['@qwik-router-config'],
      },
    },
    plugins: [
      ssgAdapter({
        origin: 'https://yoursite.qwik.dev',
      }),
    ],
  };
});
```

<Note>Remember to change the `origin` in this file to your domain.</Note>

Now, you can generate static site while using `Qwik`'s rich ecosystem, file based routing and many more.
