Skip to content

Commit a0904d7

Browse files
committed
Merge branch 'main' into pr/jpoehnelt/2089
2 parents b1b888f + b6cd347 commit a0904d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2978
-2781
lines changed

cypress/fixtures/basic/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
},
88
"devDependencies": {
99
"@slidev/cli": "workspace:*",
10-
"@slidev/theme-default": "catalog:",
11-
"@slidev/theme-seriph": "catalog:",
10+
"@slidev/theme-default": "catalog:themes",
11+
"@slidev/theme-seriph": "catalog:themes",
1212
"@slidev/types": "workspace:*",
13-
"nodemon": "catalog:"
13+
"nodemon": "catalog:dev"
1414
}
1515
}

demo/composable-vue/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
"export:clicks": "slidev export --with-clicks"
88
},
99
"devDependencies": {
10-
"@iconify-json/mdi": "catalog:",
11-
"@iconify-json/ri": "catalog:",
10+
"@iconify-json/mdi": "catalog:icons",
11+
"@iconify-json/ri": "catalog:icons",
1212
"@slidev/cli": "workspace:*",
13-
"@slidev/theme-default": "catalog:",
14-
"@slidev/theme-seriph": "catalog:",
13+
"@slidev/theme-default": "catalog:themes",
14+
"@slidev/theme-seriph": "catalog:themes",
1515
"@slidev/types": "workspace:*",
16-
"nodemon": "catalog:"
16+
"nodemon": "catalog:dev"
1717
}
1818
}

demo/starter/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
},
1010
"devDependencies": {
1111
"@slidev/cli": "workspace:*",
12-
"@slidev/theme-default": "catalog:",
13-
"@slidev/theme-seriph": "catalog:",
14-
"nodemon": "catalog:",
15-
"vue": "catalog:"
12+
"@slidev/theme-default": "catalog:themes",
13+
"@slidev/theme-seriph": "catalog:themes",
14+
"nodemon": "catalog:dev",
15+
"vue": "catalog:frontend"
1616
}
1717
}

demo/starter/slides.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ drawings:
2020
transition: slide-left
2121
# enable MDC Syntax: https://sli.dev/features/mdc
2222
mdc: true
23+
# open graph
24+
# seoMeta:
25+
# ogImage: https://cover.sli.dev
2326
---
2427

2528
# Welcome to Slidev
@@ -31,7 +34,7 @@ Presentation slides for developers
3134
</div>
3235

3336
<div class="abs-br m-6 text-xl">
34-
<button @click="$slidev.nav.openInEditor" title="Open in Editor" class="slidev-icon-btn">
37+
<button @click="$slidev.nav.openInEditor()" title="Open in Editor" class="slidev-icon-btn">
3538
<carbon:edit />
3639
</button>
3740
<a href="https://github.com/slidevjs/slidev" target="_blank" class="slidev-icon-btn">

demo/vue-runner/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
},
99
"devDependencies": {
1010
"@slidev/cli": "workspace:*",
11-
"@slidev/theme-default": "catalog:",
12-
"@slidev/theme-seriph": "catalog:",
13-
"@vue/compiler-sfc": "catalog:",
14-
"nodemon": "catalog:",
15-
"vue": "catalog:"
11+
"@slidev/theme-default": "catalog:themes",
12+
"@slidev/theme-seriph": "catalog:themes",
13+
"@vue/compiler-sfc": "catalog:demo",
14+
"nodemon": "catalog:dev",
15+
"vue": "catalog:frontend"
1616
}
1717
}

docs/.vitepress/addons.ts

+11
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,17 @@ export const community: AddonInfo[] = [
159159
},
160160
repo: 'https://github.com/sghuang19/slidev-addon-naive',
161161
},
162+
{
163+
id: 'slidev-addon-fancy-arrow',
164+
name: 'Fancy Arrow',
165+
description: 'Hand drawn arrows with various styling and positioning options',
166+
tags: ['Component'],
167+
author: {
168+
name: 'whitphx',
169+
link: 'https://github.com/whitphx',
170+
},
171+
repo: 'https://github.com/whitphx/slidev-addon-fancy-arrow',
172+
},
162173
// Add yours here!
163174
{
164175
id: '',

docs/custom/config-unocss.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
By default, Slidev enables the following presets out-of-box:
88

9-
- [@unocss/preset-uno](https://unocss.dev/presets/uno) - Tailwind / Windi CSS compatible utilities
9+
- [@unocss/preset-wind3](https://unocss.dev/presets/wind3) - Tailwind / Windi CSS compatible utilities
1010
- [@unocss/preset-attributify](https://unocss.dev/presets/attributify) - Attributify mode
1111
- [@unocss/preset-icons](https://unocss.dev/presets/icons) - Use any icons as class
1212
- [@unocss/preset-web-fonts](https://unocss.dev/presets/web-fonts) - Use web fonts at ease

docs/custom/config-vite.md

+16
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,19 @@ export default defineConfig({
6565

6666
Please pass the Vue options to the `slidev.vue` field as described above
6767
:::
68+
69+
## Add Custom Plugins based on Slide data
70+
71+
Usually you can add Vite plugins into your `vite.config.ts` (see above).
72+
However, if you want to add plugins based on the slide data, you need to add a `./setup/vite-plugins.ts` with the following content:
73+
74+
```ts twoslash
75+
import { defineVitePluginSetup } from '@slidev/types'
76+
77+
export default defineVitePluginSetup((options) => {
78+
return [
79+
// Your plugins here
80+
// Slide data is available as options.data.slides
81+
]
82+
})
83+
```

docs/custom/index.md

+13
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,19 @@ drawings:
108108
htmlAttrs:
109109
dir: ltr
110110
lang: en
111+
112+
# SEO meta tags
113+
seoMeta:
114+
ogTitle: Slidev Starter Template
115+
ogDescription: Presentation slides for developers
116+
ogImage: https://cover.sli.dev
117+
ogUrl: https://example.com
118+
twitterCard: summary_large_image
119+
twitterTitle: Slidev Starter Template
120+
twitterDescription: Presentation slides for developers
121+
twitterImage: https://cover.sli.dev
122+
twitterSite: username
123+
twitterUrl: https://example.com
111124
---
112125
```
113126

docs/features/icons.md

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ npm install @iconify-json/[the-collection-you-want]
3535
yarn add @iconify-json/[the-collection-you-want]
3636
```
3737

38+
```bash [bun]
39+
bun add @iconify-json/[the-collection-you-want]
40+
```
41+
3842
:::
3943

4044
We use [Iconify](https://iconify.design) as our data source of icons. You need to install the corresponding icon-set in `dependencies` by following the `@iconify-json/*` pattern. For example, `@iconify-json/mdi` for [Material Design Icons](https://materialdesignicons.com/), `@iconify-json/tabler` for [Tabler](https://tabler-icons.io/). You can refer to [Icônes](https://icones.js.org/) or [Iconify](https://icon-sets.iconify.design/) for all the collections available.

docs/features/mdc.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
relates:
3-
- Nuxt's MDC Syntax: https://content.nuxt.com/usage/markdown
3+
- Nuxt's MDC Syntax: https://content.nuxt.com/docs/files/markdown#mdc-syntax
44
- markdown-it-mdc: https://github.com/antfu/markdown-it-mdc
55
since: v0.43.0
66
tags: [syntax, styling]
@@ -10,7 +10,7 @@ description: |
1010

1111
# MDC Syntax
1212

13-
Slidev supports optional [MDC (Markdown Components) Syntax](https://content.nuxt.com/docs/files/markdown) powered by [`markdown-it-mdc`](https://github.com/antfu/markdown-it-mdc).
13+
Slidev supports optional [MDC (Markdown Components) Syntax](https://content.nuxt.com/docs/files/markdown#mdc-syntax) powered by [`markdown-it-mdc`](https://github.com/antfu/markdown-it-mdc).
1414

1515
You can enable it by adding `mdc: true` to the frontmatter of your markdown file.
1616

@@ -28,4 +28,4 @@ The **default** slot
2828
::
2929
```
3030

31-
Learn more about [MDC Syntax](https://content.nuxt.com/guide/writing/mdc).
31+
Learn more about [MDC Syntax](https://content.nuxt.com/docs/files/markdown#mdc-syntax).

docs/features/prettier-plugin.md

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ pnpm i -D prettier prettier-plugin-slidev
2828
yarn add -D prettier prettier-plugin-slidev
2929
```
3030

31+
```bash [bun]
32+
bun add -D prettier prettier-plugin-slidev
33+
```
34+
3135
:::
3236

3337
## 2. Activate the plugin

docs/features/remote-access.md

+10
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ yarn dev --remote
2929
# i.e. slidev --remote
3030
```
3131

32+
```bash [bun]
33+
bun dev --remote
34+
# i.e. slidev --remote
35+
```
36+
3237
:::
3338

3439
## Password Protection
@@ -56,4 +61,9 @@ yarn dev --remote --tunnel
5661
# i.e. slidev --remote --tunnel
5762
```
5863

64+
```bash [bun]
65+
bun dev --remote --tunnel
66+
# i.e. slidev --remote --tunnel
67+
```
68+
5969
:::

docs/guide/exporting.md

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ $ npm i -D playwright-chromium
3838
$ yarn add -D playwright-chromium
3939
```
4040

41+
```bash [bun]
42+
$ bun add -D playwright-chromium
43+
```
44+
4145
:::
4246

4347
## Formats

docs/guide/index.md

+8
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ npm init slidev@latest
6565
yarn create slidev
6666
```
6767

68+
```bash [bun]
69+
bun create slidev
70+
```
71+
6872
:::
6973

7074
Follow the prompts to start your slides project. The slides content is in `slides.md`, which initially includes demos of most the Slidev features. For more information about the Markdown syntax, please check <LinkInline link="guide/syntax" />.
@@ -87,6 +91,10 @@ npm i -g @slidev/cli
8791
yarn global add @slidev/cli
8892
```
8993

94+
```bash [bun]
95+
bun i -g @slidev/cli
96+
```
97+
9098
:::
9199

92100
Then, you can create and start a single file slides via:

docs/guide/write-theme.md

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ $ npm init slidev-theme@latest
2020
$ yarn create slidev-theme
2121
```
2222

23+
```bash [bun]
24+
$ bun create slidev-theme
25+
```
26+
2327
:::
2428

2529
Then you can modify and play with it. You can also refer to the [official themes](../resources/theme-gallery#official-themes) as examples.

docs/package.json

+20-19
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
11
{
22
"name": "docs",
33
"type": "module",
4-
"version": "51.3.0",
4+
"version": "51.4.0",
55
"private": true,
66
"scripts": {
77
"dev": "vitepress",
88
"build": "vitepress build",
99
"preview": "vitepress preview"
1010
},
1111
"dependencies": {
12-
"@antfu/utils": "catalog:",
13-
"@vueuse/core": "catalog:",
14-
"typeit": "catalog:"
12+
"@antfu/utils": "catalog:frontend",
13+
"@vueuse/core": "catalog:frontend",
14+
"typeit": "catalog:docs"
1515
},
1616
"devDependencies": {
17-
"@iconify/json": "catalog:",
18-
"@shikijs/vitepress-twoslash": "catalog:",
17+
"@iconify/json": "catalog:icons",
18+
"@shikijs/vitepress-twoslash": "catalog:prod",
1919
"@slidev/client": "workspace:*",
2020
"@slidev/parser": "workspace:*",
2121
"@slidev/types": "workspace:*",
22-
"@types/node": "catalog:",
23-
"@unocss/reset": "catalog:",
24-
"fast-glob": "catalog:",
25-
"gray-matter": "catalog:",
26-
"markdown-it": "catalog:",
27-
"shiki": "catalog:",
28-
"typescript": "catalog:",
29-
"unocss": "catalog:",
30-
"unplugin-icons": "catalog:",
31-
"unplugin-vue-components": "catalog:",
32-
"vite-plugin-inspect": "catalog:",
33-
"vitepress": "catalog:",
34-
"vue": "catalog:"
22+
"@types/node": "catalog:types",
23+
"@unocss/reset": "catalog:frontend",
24+
"fast-glob": "catalog:prod",
25+
"gray-matter": "catalog:prod",
26+
"markdown-it": "catalog:prod",
27+
"shiki": "catalog:frontend",
28+
"typescript": "catalog:dev",
29+
"unocss": "catalog:prod",
30+
"unplugin-icons": "catalog:prod",
31+
"unplugin-vue-components": "catalog:prod",
32+
"vite-plugin-inspect": "catalog:prod",
33+
"vitepress": "catalog:docs",
34+
"vitepress-plugin-llms": "catalog:docs",
35+
"vue": "catalog:frontend"
3536
}
3637
}

docs/vite.config.ts

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Icons from 'unplugin-icons/vite'
44
import Components from 'unplugin-vue-components/vite'
55
import { defineConfig } from 'vite'
66
import Inspect from 'vite-plugin-inspect'
7+
import llmstxt from 'vitepress-plugin-llms'
78

89
export default defineConfig({
910
optimizeDeps: {
@@ -19,6 +20,12 @@ export default defineConfig({
1920
},
2021
},
2122
plugins: [
23+
llmstxt({
24+
ignoreFiles: [
25+
'index.md',
26+
'README.md',
27+
],
28+
}),
2229
Components({
2330
dirs: [
2431
'./.vitepress/theme/components',

eslint.config.js

+24-21
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
import antfu from '@antfu/eslint-config'
22

3-
export default antfu(
4-
{
5-
overrides: {
6-
vue: {
7-
'vue/no-v-text-v-html-on-component': 'off',
8-
'vue/component-name-in-template-casing': 'off',
9-
},
10-
},
11-
formatters: {
12-
markdown: true,
13-
css: true,
14-
slidev: {
15-
files: [
16-
'**/slides.md',
17-
'**/template.md',
18-
'**/example.md',
19-
'test/fixtures/markdown/**/*.md',
20-
'packages/vscode/syntaxes/slidev.example.md',
21-
],
22-
},
3+
export default antfu({
4+
pnpm: true,
5+
formatters: {
6+
markdown: true,
7+
css: true,
8+
slidev: {
9+
files: [
10+
'**/slides.md',
11+
'**/template.md',
12+
'**/example.md',
13+
'test/fixtures/markdown/**/*.md',
14+
'packages/vscode/syntaxes/slidev.example.md',
15+
],
2316
},
2417
},
25-
)
18+
})
19+
.removeRules(
20+
'vue/no-v-text-v-html-on-component',
21+
'vue/component-name-in-template-casing',
22+
)
23+
.override('antfu/pnpm/package-json', {
24+
ignores: [
25+
'packages/create-theme/template/package.json',
26+
'packages/create-app/template/package.json',
27+
],
28+
})

0 commit comments

Comments
 (0)