@slidev/docs 52.0.1 → 52.2.3

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.
@@ -253,7 +253,7 @@ Apply scaling or transforming to elements.
253
253
  ### Usage
254
254
 
255
255
  ```md
256
- <Transform :scale="0.5">
256
+ <Transform :scale="0.5" origin="top center">
257
257
  <YourElements />
258
258
  </Transform>
259
259
  ```
@@ -214,4 +214,10 @@ This shows on the left
214
214
  # Right
215
215
 
216
216
  This shows on the right
217
+
218
+ <style>
219
+ .two-cols-header {
220
+ column-gap: 20px; /* Adjust the gap size as needed */
221
+ }
222
+ </style>
217
223
  ```
@@ -0,0 +1,41 @@
1
+ ---
2
+ relates:
3
+ - features/seo-meta
4
+ tags: ['SEO', head]
5
+ description: |
6
+ Set the Open Graph image for your slides.
7
+ ---
8
+
9
+ # Open Graph Image
10
+
11
+ Slidev allows you to set the Open Graph image via the `seoMeta.ogImage` option in the headmatter:
12
+
13
+ ```md
14
+ ---
15
+ seoMeta:
16
+ ogImage: https://url.to.your.image.png
17
+ ---
18
+
19
+ # Your slides here
20
+ ```
21
+
22
+ Learn more about [SEO Meta Tags](./seo-meta).
23
+
24
+ ## Local Image
25
+
26
+ If you have `./og-image.png` in your project root, Slidev will grab it as the Open Graph image automatically without any configuration.
27
+
28
+ ## Auto-generate
29
+
30
+ Since v52.1.0, Slidev supports auto-generating the Open Graph image from the first slide.
31
+
32
+ You can set `seoMeta.ogImage` to `auto` to enable this feature.
33
+
34
+ ```md
35
+ ---
36
+ seoMeta:
37
+ ogImage: auto
38
+ ---
39
+ ```
40
+
41
+ It will use [playwright](https://playwright.dev/) to capture the first slide and save it as `./og-image.png` (same as `slidev export`). You may also commit the generated image to your repository to avoid the auto-generation. Or if you generate it on CI, you might also want to setup the playwright environment.
@@ -52,7 +52,7 @@ You can open a [Cloudflare Quick Tunnels](https://developers.cloudflare.com/clou
52
52
  ::: code-group
53
53
 
54
54
  ```bash [pnpm]
55
- pnpm dev -- --remote --tunnel
55
+ pnpm dev --remote --tunnel
56
56
  # i.e. slidev --remote --tunnel
57
57
  ```
58
58
 
@@ -17,15 +17,15 @@ Slidev integrates [Rough Notation](https://github.com/linkstrifer/react-rough-no
17
17
 
18
18
  ### `v-mark` directive
19
19
 
20
- Rough Notation integrates comes with the `v-mark` directive.
20
+ Rough Notation integration comes with the `v-mark` directive.
21
21
 
22
22
  #### Type
23
23
 
24
- `v-mark.underline` for the underline mark, `v-mark.circle` for the circle mark, etc. Default to `underline`
24
+ Use `v-mark.underline` for the underline mark, `v-mark.circle` for the circle mark, etc. (defaults to `underline`).
25
25
 
26
26
  #### Color
27
27
 
28
- `v-mark.red` makes the notation `red`. Supported built-in color themes from UnoCSS. For custom colors, use object syntax `v-mark="{ color: '#234' }"`
28
+ `v-mark.red` makes the notation `red`. Supported built-in color themes from UnoCSS. For custom colors, use object syntax `v-mark="{ color: '#234' }"`.
29
29
 
30
30
  #### Clicks
31
31
 
@@ -33,7 +33,7 @@ Rough Notation integrates comes with the `v-mark` directive.
33
33
 
34
34
  #### Options
35
35
 
36
- Optionally you can pass an object to `v-mark` to specify the options, for example:
36
+ Optionally, you can pass an object to `v-mark` to specify the options, for example:
37
37
 
38
38
  ```vue
39
39
  <span v-mark="{ at: 5, color: '#234', type: 'circle' }">
@@ -0,0 +1,36 @@
1
+ ---
2
+ depends:
3
+ - custom/index#headmatter
4
+ relates:
5
+ - features/og-image
6
+ tags: [SEO, head]
7
+ description: |
8
+ Configure SEO meta tags for better social media sharing and search engine optimization.
9
+ ---
10
+
11
+ # SEO Meta Tags
12
+
13
+ Slidev allows you to configure SEO meta tags in the headmatter to improve social media sharing and search engine optimization. You can set up Open Graph and Twitter Card meta tags to control how your slides appear when shared on social platforms.
14
+
15
+ ## Configuration
16
+
17
+ Add the `seoMeta` configuration to your slides deck frontmatter:
18
+
19
+ ```yaml
20
+ ---
21
+ # SEO meta tags
22
+ seoMeta:
23
+ ogTitle: Slidev Starter Template
24
+ ogDescription: Presentation slides for developers
25
+ ogImage: https://cover.sli.dev
26
+ ogUrl: https://example.com
27
+ twitterCard: summary_large_image
28
+ twitterTitle: Slidev Starter Template
29
+ twitterDescription: Presentation slides for developers
30
+ twitterImage: https://cover.sli.dev
31
+ twitterSite: username
32
+ twitterUrl: https://example.com
33
+ ---
34
+ ```
35
+
36
+ This feature is powered by [unhead](https://unhead.unjs.io/)'s `useHead` hook, please refer to the [documentation](https://unhead.unjs.io/docs/head/api/composables/use-seo-meta) for more details.
@@ -13,7 +13,7 @@ description: |
13
13
  The `Transform` component allows you to scale the size of the elements on your slides:
14
14
 
15
15
  ```md
16
- <Transform :scale="0.5">
16
+ <Transform :scale="0.5" origin="top center">
17
17
  <YourElements />
18
18
  </Transform>
19
19
  ```
@@ -197,11 +197,11 @@ You can also specify the enter and leave index for the `v-click` directive by pa
197
197
 
198
198
  ```md
199
199
  <div v-click.hide="[2, 4]">
200
- This will be hidden at click 2 and 3.
200
+ This will be hidden at click 2 and 3 (and shown otherwise).
201
201
  </div>
202
202
  <div v-click />
203
203
  <div v-click="['+1', '+1']">
204
- This will be shown at click 3, and hidden since click 4.
204
+ This will be shown only at click 2 (and hidden otherwise).
205
205
  </div>
206
206
  ```
207
207
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/docs",
3
3
  "type": "module",
4
- "version": "52.0.1",
4
+ "version": "52.2.3",
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.353",
21
- "@shikijs/vitepress-twoslash": "^3.7.0",
22
- "@types/node": "^24.0.7",
23
- "@unocss/reset": "^66.3.2",
24
- "@vueuse/core": "^13.4.0",
20
+ "@iconify/json": "^2.2.385",
21
+ "@shikijs/vitepress-twoslash": "^3.13.0",
22
+ "@types/node": "^24.5.2",
23
+ "@unocss/reset": "^66.5.1",
24
+ "@vueuse/core": "^13.9.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.7.0",
28
+ "shiki": "^3.13.0",
29
29
  "typeit": "8.1.0",
30
- "typescript": "^5.8.3",
31
- "unocss": "^66.3.2",
32
- "unplugin-icons": "^22.1.0",
30
+ "typescript": "^5.9.2",
31
+ "unocss": "^66.5.1",
32
+ "unplugin-icons": "^22.3.0",
33
33
  "unplugin-vue-components": "^28.8.0",
34
- "vite-plugin-inspect": "^11.3.0",
35
- "vitepress": "^2.0.0-alpha.7",
36
- "vitepress-plugin-group-icons": "^1.6.0",
37
- "vitepress-plugin-llms": "^1.6.0",
38
- "vue": "^3.5.17",
39
- "@slidev/parser": "52.0.1",
40
- "@slidev/types": "52.0.1",
41
- "@slidev/client": "52.0.1"
34
+ "vite-plugin-inspect": "^11.3.3",
35
+ "vitepress": "^2.0.0-alpha.12",
36
+ "vitepress-plugin-group-icons": "^1.6.3",
37
+ "vitepress-plugin-llms": "^1.7.5",
38
+ "vue": "^3.5.21",
39
+ "@slidev/parser": "52.2.3",
40
+ "@slidev/client": "52.2.3",
41
+ "@slidev/types": "52.2.3"
42
42
  },
43
43
  "scripts": {
44
44
  "dev": "vitepress",