Skip to content

Commit

Permalink
docs: improve usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
42willow committed Sep 7, 2024
1 parent b53e700 commit 9076887
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@

## Usage

1. Install the theme using `npm install 42willow/vitepress`
1. Install the theme package to your project with `npm install @catppuccin/vitepress`.

2. Add the theme to your VitePress theme configuration file:

2. Import the theme
`.vitepress/theme/index.ts`

```ts
Expand All @@ -48,9 +49,10 @@
export default DefaultTheme;
```

See [extending the default theme](https://vitepress.dev/guide/extending-default-theme#extending-the-default-theme) for more information.
See ["Extending the Default Theme | VitePress"](https://vitepress.dev/guide/extending-default-theme#extending-the-default-theme) for more information.

3. Configure syntax highlighting in your VitePress configuration file:

3. Set syntax highlighting to Catppuccin
`.vitepress/config.mts`

```ts
Expand Down
1 change: 1 addition & 0 deletions site/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default defineConfig({
description: "A VitePress theme",
srcDir: "./src",
base: "/vitepress/",
// https://vitepress.dev/guide/markdown#syntax-highlighting-in-code-blocks
markdown: {
theme: {
light: "catppuccin-latte",
Expand Down
18 changes: 10 additions & 8 deletions site/src/install.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
# Usage

1. Install the theme using your preferred package manager
1. Install the theme package to your project with your preferred package manager:

::: code-group

```bash [npm]
npm install 42willow/vitepress
npm install @catppuccin/vitepress
```

```bash [Yarn]
yarn add git+https://github.com/42willow/vitepress.git
yarn add @catppuccin/vitepress
```

```bash [pnpm]
pnpm add github:42willow/vitepress
pnpm add @catppuccin/vitepress
```

```bash [Bun]
bun add github:42willow/vitepress
bun add @catppuccin/vitepress
```

:::

2. Import the theme
2. Add the theme to your VitePress theme configuration file:

::: code-group

Expand All @@ -34,12 +35,13 @@

:::

See [extending the default theme](https://vitepress.dev/guide/extending-default-theme#extending-the-default-theme) for more information.
See ["Extending the Default Theme | VitePress"](https://vitepress.dev/guide/extending-default-theme#extending-the-default-theme) for more information.

> [!NOTE]
> Latte is included in all flavors as the light mode variant.
3. Set syntax highlighting to Catppuccin
3. Configure syntax highlighting in your VitePress configuration file:

::: code-group

```ts{6} [.vitepress/config.mts]
Expand Down

0 comments on commit 9076887

Please sign in to comment.