Skip to content

Commit

Permalink
docs(installation): Add Vitepress configuration (#20044)
Browse files Browse the repository at this point in the history
Co-authored-by: John Leider <[email protected]>
  • Loading branch information
Dzyanino and johnleider authored Jul 9, 2024
1 parent 650ba25 commit 6a46d33
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions packages/docs/src/pages/en/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,51 @@ const app = createApp()
app.use(vuetify).mount('#app')
```

## Using Vitepress

You can use Vuetify's components in your Vitepress static site.

First, add vuetify to your dependencies

::: tabs

```bash [yarn]
yarn create vuetify
```

```bash [npm]
npm create vuetify@latest
```

```bash [pnpm]
pnpm create vuetify
```

```bash [bun]
bun create vuetify
```

:::

Then, in your `.vitepress/theme/index.ts`

```ts
import DefaultTheme from 'vitepress/theme'
import 'vuetify/styles'
import * as components from 'vuetify/components'
import * as directives from 'vuetify/directives'
import { createVuetify } from 'vuetify'

const vuetify = createVuetify({ components, directives })

export default {
...DefaultTheme,
enhanceApp({ app }) {
app.use(vuetify)
},
}
```

## Existing projects

Follow these steps if for example you are adding Vuetify to an existing project, or simply do not want to use a scaffolding tool.
Expand Down

0 comments on commit 6a46d33

Please sign in to comment.