@slidev/docs 51.8.0 → 51.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/features/code-groups.md +42 -15
- package/features/icons.md +4 -0
- package/features/prettier-plugin.md +4 -0
- package/features/remote-access.md +10 -0
- package/guide/exporting.md +4 -0
- package/guide/index.md +8 -0
- package/guide/layout.md +1 -1
- package/guide/write-theme.md +4 -0
- package/package.json +16 -16
package/features/code-groups.md
CHANGED
|
@@ -33,11 +33,17 @@ pnpm add @slidev/cli
|
|
|
33
33
|
|
|
34
34
|
## Title Icon Matching
|
|
35
35
|
|
|
36
|
-
`code groups` and `
|
|
36
|
+
`code groups`, `code block` and [`Shiki Magic Move`](/features/shiki-magic-move) also supports the automatically icon matching by the title name.
|
|
37
37
|
|
|
38
38
|

|
|
39
39
|
|
|
40
|
-
:::
|
|
40
|
+
::: info
|
|
41
|
+
|
|
42
|
+
By default, we provide some built-in icons, you can use them by install [@iconify-json/vscode-icons](https://www.npmjs.com/package/@iconify-json/vscode-icons).
|
|
43
|
+
|
|
44
|
+
:::
|
|
45
|
+
|
|
46
|
+
::: details All built-in icons
|
|
41
47
|
|
|
42
48
|
```js
|
|
43
49
|
const builtinIcons = {
|
|
@@ -103,26 +109,47 @@ const builtinIcons = {
|
|
|
103
109
|
|
|
104
110
|
:::
|
|
105
111
|
|
|
106
|
-
## Custom
|
|
112
|
+
## Custom Icons
|
|
113
|
+
|
|
114
|
+
You can use any name from the [iconify](https://icones.js.org) collection by using the `~icon~` syntax, for example:
|
|
115
|
+
|
|
116
|
+
````md
|
|
117
|
+
```js [npm ~i-uil:github~]
|
|
118
|
+
console.log('Hello, GitHub!')
|
|
119
|
+
```
|
|
120
|
+
````
|
|
121
|
+
|
|
122
|
+
To make it work, you need to:
|
|
123
|
+
|
|
124
|
+
1. Install the icon's collection.
|
|
125
|
+
|
|
126
|
+
:::code-group
|
|
107
127
|
|
|
108
|
-
|
|
128
|
+
```sh [npm]
|
|
129
|
+
npm add @iconify-json/uil
|
|
130
|
+
```
|
|
109
131
|
|
|
110
|
-
|
|
132
|
+
```sh [yarn]
|
|
133
|
+
yarn add @iconify-json/uil
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
```sh [pnpm]
|
|
137
|
+
pnpm add @iconify-json/uil
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
```sh [bun]
|
|
141
|
+
bun add @iconify-json/uil
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
:::
|
|
145
|
+
|
|
146
|
+
2. Add the icon to the `uno.config.ts` file.
|
|
111
147
|
|
|
112
148
|
```ts [uno.config.ts] {3-5}
|
|
113
149
|
import { defineConfig } from 'unocss'
|
|
114
|
-
|
|
115
150
|
export default defineConfig({
|
|
116
151
|
safelist: [
|
|
117
|
-
'i-
|
|
152
|
+
'i-uil:github',
|
|
118
153
|
],
|
|
119
154
|
})
|
|
120
155
|
```
|
|
121
|
-
|
|
122
|
-
2. Use the icon in the code block with the `~icon~` syntax:
|
|
123
|
-
|
|
124
|
-
````md
|
|
125
|
-
```sh [npm ~i-vscode-icons:file-type-coverage~]
|
|
126
|
-
npm i @slidev/cli
|
|
127
|
-
```
|
|
128
|
-
````
|
package/features/icons.md
CHANGED
|
@@ -39,6 +39,10 @@ yarn add @iconify-json/[the-collection-you-want]
|
|
|
39
39
|
bun add @iconify-json/[the-collection-you-want]
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
```bash [deno]
|
|
43
|
+
deno add jsr:@iconify-json/[the-collection-you-want]
|
|
44
|
+
```
|
|
45
|
+
|
|
42
46
|
:::
|
|
43
47
|
|
|
44
48
|
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.
|
|
@@ -34,6 +34,11 @@ bun dev --remote
|
|
|
34
34
|
# i.e. slidev --remote
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
```bash [deno]
|
|
38
|
+
deno run dev --remote
|
|
39
|
+
# i.e. slidev --remote
|
|
40
|
+
```
|
|
41
|
+
|
|
37
42
|
:::
|
|
38
43
|
|
|
39
44
|
## Password Protection
|
|
@@ -66,4 +71,9 @@ bun dev --remote --tunnel
|
|
|
66
71
|
# i.e. slidev --remote --tunnel
|
|
67
72
|
```
|
|
68
73
|
|
|
74
|
+
```bash [deno]
|
|
75
|
+
deno run dev --remote --tunnel
|
|
76
|
+
# i.e. slidev --remote --tunnel
|
|
77
|
+
```
|
|
78
|
+
|
|
69
79
|
:::
|
package/guide/exporting.md
CHANGED
package/guide/index.md
CHANGED
|
@@ -69,6 +69,10 @@ yarn create slidev
|
|
|
69
69
|
bun create slidev
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
+
```bash [deno]
|
|
73
|
+
deno init --npm slidev
|
|
74
|
+
```
|
|
75
|
+
|
|
72
76
|
:::
|
|
73
77
|
|
|
74
78
|
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" />.
|
|
@@ -95,6 +99,10 @@ yarn global add @slidev/cli
|
|
|
95
99
|
bun i -g @slidev/cli
|
|
96
100
|
```
|
|
97
101
|
|
|
102
|
+
```bash [deno]
|
|
103
|
+
deno i -g npm:@slidev/cli --name slidev
|
|
104
|
+
```
|
|
105
|
+
|
|
98
106
|
:::
|
|
99
107
|
|
|
100
108
|
Then, you can create and start a single file slides via:
|
package/guide/layout.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Slide Layout
|
|
2
2
|
|
|
3
|
-
Layouts in Slidev are used to define the structure for each
|
|
3
|
+
Layouts in Slidev are used to define the structure for each slide. They are Vue components that wrap the content of the slides.
|
|
4
4
|
|
|
5
5
|
## Using Layouts {#use}
|
|
6
6
|
|
package/guide/write-theme.md
CHANGED
|
@@ -24,6 +24,10 @@ $ yarn create slidev-theme
|
|
|
24
24
|
$ bun create slidev-theme
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
```bash [deno]
|
|
28
|
+
$ deno init --npm slidev-theme
|
|
29
|
+
```
|
|
30
|
+
|
|
27
31
|
:::
|
|
28
32
|
|
|
29
33
|
Then you can modify and play with it. You can also refer to the [official themes](../resources/theme-gallery#official-themes) as examples.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/docs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "51.8.
|
|
4
|
+
"version": "51.8.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"funding": "https://github.com/sponsors/antfu",
|
|
7
7
|
"homepage": "https://sli.dev",
|
|
@@ -17,28 +17,28 @@
|
|
|
17
17
|
],
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@antfu/utils": "^9.2.0",
|
|
20
|
-
"@iconify/json": "^2.2.
|
|
21
|
-
"@shikijs/vitepress-twoslash": "^3.
|
|
22
|
-
"@types/node": "^22.15.
|
|
23
|
-
"@unocss/reset": "^66.
|
|
24
|
-
"@vueuse/core": "^13.
|
|
20
|
+
"@iconify/json": "^2.2.348",
|
|
21
|
+
"@shikijs/vitepress-twoslash": "^3.6.0",
|
|
22
|
+
"@types/node": "^22.15.31",
|
|
23
|
+
"@unocss/reset": "^66.2.0",
|
|
24
|
+
"@vueuse/core": "^13.3.0",
|
|
25
25
|
"fast-glob": "^3.3.3",
|
|
26
26
|
"gray-matter": "^4.0.3",
|
|
27
27
|
"markdown-it": "^14.1.0",
|
|
28
|
-
"shiki": "^3.
|
|
28
|
+
"shiki": "^3.6.0",
|
|
29
29
|
"typeit": "8.1.0",
|
|
30
30
|
"typescript": "^5.8.3",
|
|
31
|
-
"unocss": "^66.
|
|
31
|
+
"unocss": "^66.2.0",
|
|
32
32
|
"unplugin-icons": "^22.1.0",
|
|
33
|
-
"unplugin-vue-components": "^28.
|
|
33
|
+
"unplugin-vue-components": "^28.7.0",
|
|
34
34
|
"vite-plugin-inspect": "^11.1.0",
|
|
35
|
-
"vitepress": "^2.0.0-alpha.
|
|
36
|
-
"vitepress-plugin-group-icons": "^1.
|
|
37
|
-
"vitepress-plugin-llms": "^1.
|
|
38
|
-
"vue": "^3.5.
|
|
39
|
-
"@slidev/parser": "51.8.
|
|
40
|
-
"@slidev/client": "51.8.
|
|
41
|
-
"@slidev/types": "51.8.
|
|
35
|
+
"vitepress": "^2.0.0-alpha.6",
|
|
36
|
+
"vitepress-plugin-group-icons": "^1.6.0",
|
|
37
|
+
"vitepress-plugin-llms": "^1.5.0",
|
|
38
|
+
"vue": "^3.5.16",
|
|
39
|
+
"@slidev/parser": "51.8.2",
|
|
40
|
+
"@slidev/client": "51.8.2",
|
|
41
|
+
"@slidev/types": "51.8.2"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"dev": "vitepress",
|