From 152e0f6daf66b81d24969bbeae3655f23e93bcc6 Mon Sep 17 00:00:00 2001 From: Mathieu TUDISCO Date: Mon, 15 Nov 2021 07:04:28 +0100 Subject: [PATCH 001/134] docs: typo in sidebar (#43) --- .vitepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vitepress/config.js b/.vitepress/config.js index ed7fd49..8599e5b 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.js @@ -42,7 +42,7 @@ const Guide = [ link: '/guide/presenter-mode', }, { - text: 'Drawing & Annonations', + text: 'Drawing & Annotations', link: '/guide/drawing', }, { From ad008f0449f00d699e7a8cfd06cd5119cc57fd9f Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 17 Nov 2021 18:56:32 +0100 Subject: [PATCH 002/134] docs: typos in code (#45) --- custom/highlighters.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom/highlighters.md b/custom/highlighters.md index dbee808..994026b 100644 --- a/custom/highlighters.md +++ b/custom/highlighters.md @@ -60,8 +60,8 @@ import { defineShikiSetup } from '@slidev/types' export default defineShikiSetup(async({ loadTheme }) => { return { theme: { - dark: await loadTheme('path/to/theme.json')), - light: await loadTheme('path/to/theme.json')), + dark: await loadTheme('path/to/theme.json'), + light: await loadTheme('path/to/theme.json'), }, } }) From 5d92892e4c0e345ea45cde50316330f4c97117de Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 17 Nov 2021 18:56:43 +0100 Subject: [PATCH 003/134] docs: typo (#44) --- guide/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/install.md b/guide/install.md index 58e2048..29988f0 100644 --- a/guide/install.md +++ b/guide/install.md @@ -39,7 +39,7 @@ $ npx slidev > Please note if you are using [pnpm](https://pnpm.io), you will need to enable [shamefully-hoist](https://pnpm.io/npmrc#shamefully-hoist) option for Slidev to work properly: > > ```bash -> echo 'shamefully-flatten=true' >> .npmrc +> echo 'shamefully-hoist=true' >> .npmrc > ``` ## Install Globally From c393c03ca6c46af4a218f37db04bc399bde16088 Mon Sep 17 00:00:00 2001 From: Christian S Date: Sat, 4 Dec 2021 00:56:52 +0100 Subject: [PATCH 004/134] chore: typo (#46) --- builtin/layouts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/layouts.md b/builtin/layouts.md index a8970d9..1b655a6 100644 --- a/builtin/layouts.md +++ b/builtin/layouts.md @@ -15,7 +15,7 @@ Used to display the cover page for the presentation, may contain the presentatio ### `default` -The most baisc layout, to display any kind of content. +The most basic layout, to display any kind of content. ### `end` From fbc97d802e30cc663321c93b32fff3cee9ca7ff9 Mon Sep 17 00:00:00 2001 From: Arnaud Thomas D Date: Thu, 9 Dec 2021 00:49:21 +0100 Subject: [PATCH 005/134] docs: fix typo (#47) --- custom/fonts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/fonts.md b/custom/fonts.md index 02b4a4d..6be9f4f 100644 --- a/custom/fonts.md +++ b/custom/fonts.md @@ -100,7 +100,7 @@ Currently, only Google Fonts is supported, we are planned to add more providers ```yaml --- fonts: - provide: 'none' + provider: 'none' --- ``` From a261c239adbbea08fafc043330460e1e7bb16e54 Mon Sep 17 00:00:00 2001 From: tkgroot Date: Mon, 20 Dec 2021 18:43:30 +0100 Subject: [PATCH 006/134] chore: typo (#48) --- builtin/layouts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/layouts.md b/builtin/layouts.md index 1b655a6..d50357e 100644 --- a/builtin/layouts.md +++ b/builtin/layouts.md @@ -7,7 +7,7 @@ ### `center` -Displays the content in the middle of the sreen. +Displays the content in the middle of the screen. ### `cover` From 06ae2757fe5d59fbc9f2acd5867bba7521f3d679 Mon Sep 17 00:00:00 2001 From: Tony Cabaye Date: Mon, 17 Jan 2022 16:56:33 +0100 Subject: [PATCH 007/134] feat: add TOC documentation (#49) --- builtin/components.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/builtin/components.md b/builtin/components.md index 822a9e6..b957d8e 100644 --- a/builtin/components.md +++ b/builtin/components.md @@ -4,6 +4,42 @@ > The documentations of this section is still working in progress. Before that, you can take a look at the [source code](https://github.com/slidevjs/slidev/blob/main/packages/client/builtin) directly. +### `TOC` + +Insert a Table Of Content. + +Titles and title levels get automatically retrieved from the first title element of each slides. + +You can override this automatic behaviour for a slide by using the front matter syntax: +```yml +--- +title: Amazing slide title +level: 2 +--- +``` + +Or if you prefer the slide to not appear in the TOC at all, you can use: +```yml +--- +hideInToc: true +--- +``` + +#### Usage +~~~md + +~~~ + +Parameters: + +* `columns` (`string | number`, default: `1`): The number of columns of the display +* `maxDepth` (`string | number`, default: `Infinity`): The maximum depth level of title to display +* `minDepth` (`string | number`, default: `1`): The minimum depth level of title to display +* `mode` (`'all' | 'onlyCurrentTree'| 'onlySiblings'`, default: `'all'`): + * `'all'`: Display all items + * `'onlyCurrentTree'`: Display only items that are in current tree (active item, parents and children of active item) + * `'onlySiblings'`: Display only items that are in current tree and their direct siblings + ## Custom Components Create a directory `components/` under your project root, and simply put your custom Vue components under it, then you can use it with the same name in your markdown file! From ce73d5801d6634c1734058202032c57f3360bfe3 Mon Sep 17 00:00:00 2001 From: chengpeiquan Date: Tue, 18 Jan 2022 13:14:14 +0800 Subject: [PATCH 008/134] fix: broken links (#50) --- themes/write-a-theme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/write-a-theme.md b/themes/write-a-theme.md index f802bdf..45658dc 100644 --- a/themes/write-a-theme.md +++ b/themes/write-a-theme.md @@ -120,7 +120,7 @@ Slidev toggles a `dark` class on the page's `html` element for switching color s Syntax highlighting colors are also provided in the theme. We support both [Prism](https://prismjs.com/) and [Shiki](https://github.com/shikijs/shiki). For more information please refer to [the syntax highlighting docs](/custom/highlighters). -You can support either one of them, or both. Refer to the default theme for configurations examples [`./styles/prism.css`](https://github.com/slidevjs/slidev/blob/main/packages/theme-default/styles/prism.css) / [`./setup/shiki.ts`](https://github.com/slidevjs/slidev/blob/main/packages/theme-default/setup/shiki.ts). +You can support either one of them, or both. Refer to the default theme for configurations examples [`./styles/code.css`](https://github.com/slidevjs/slidev/blob/main/packages/create-theme/template/styles/code.css) / [`./setup/shiki.ts`](https://github.com/slidevjs/slidev/blob/main/packages/create-theme/template/setup/shiki.ts). Also, remember to specify the supported highlighters in your `package.json` From 4890d427ba544b99fd2fae4ba003b50a13fae3a5 Mon Sep 17 00:00:00 2001 From: Plat <60182057+p1atdev@users.noreply.github.com> Date: Sun, 6 Feb 2022 21:56:38 +0900 Subject: [PATCH 009/134] Minor notation change (#51) --- resources/learning.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/learning.md b/resources/learning.md index 14da52c..cfa4cab 100644 --- a/resources/learning.md +++ b/resources/learning.md @@ -16,7 +16,7 @@ - [神器!这款开源项目可以让你使用 Markdown 来做 PPT!](https://zhuanlan.zhihu.com/p/377567327) by [Github掘金计划](https://www.zhihu.com/people/github-stars) - [【用 markdown 写 Slide!】神器 Slidev 的安装及 bug 解决](https://blog.csdn.net/weixin_43828250/article/details/116664775) by HaloHoohoo -## 日本语 +## 日本語 - [開発者のためのスライド作成ツール Slidev がすごい](https://zenn.dev/ryo_kawamata/articles/introduce-slidev) by [ryo_kawamata](https://zenn.dev/ryo_kawamata) - [Markdownでオシャレなスライドを作るSli.dev](https://qiita.com/e99h2121/items/a115f8865a0dc21bb462) by [Nobuko YAMADA](https://qiita.com/e99h2121) From d99ebc341368cc7f6df4ae4cbd893a171a853aa6 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Mon, 7 Feb 2022 09:55:59 +0800 Subject: [PATCH 010/134] feat: add ja trans --- .vitepress/config.js | 4 ++++ README.md | 1 + 2 files changed, 5 insertions(+) diff --git a/.vitepress/config.js b/.vitepress/config.js index 8599e5b..915337d 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.js @@ -106,6 +106,10 @@ const Translations = [ text: 'Ελληνικά', link: 'https://el.sli.dev{{pathname}}', }, + { + text: '日本語', + link: 'https://ja.sli.dev{{pathname}}', + }, ] const Customizations = [ diff --git a/README.md b/README.md index d3f0f88..cc88fa2 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Documentation for [Slidev](https://github.com/slidevjs/slidev) | Deutsch | [docs-de](https://github.com/slidevjs/docs-de) | [de.sli.dev](https://de.sli.dev) | [@fabiankachlock](https://github.com/fabiankachlock) | | Português (BR) | [docs-br](https://github.com/slidevjs/docs-br) | [br.sli.dev](https://br.sli.dev) | [@luisfelipesdn12](https://github.com/luisfelipesdn12) | | Ελληνικά | [docs-el](https://github.com/slidevjs/docs-el) | [el.sli.dev](https://el.sli.dev) | [@GeopJr](https://github.com/GeopJr) | +| 日本語 | [docs-ja](https://github.com/slidevjs/docs-el) | [ja.sli.dev](https://ja.sli.dev) | [@IkumaTadokoro](https://github.com/IkumaTadokoro) | ## Start Server Locally From e89a81b443cfb679cd8c86c03daff8f512d98f1d Mon Sep 17 00:00:00 2001 From: Alexander Eble <35292572+alexanderdavide@users.noreply.github.com> Date: Mon, 14 Feb 2022 08:15:17 +0100 Subject: [PATCH 011/134] docs: add favicon frontmatter configure (#53) Co-authored-by: Alexander Eble --- custom/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom/index.md b/custom/index.md index cae9780..33b9bab 100644 --- a/custom/index.md +++ b/custom/index.md @@ -33,6 +33,8 @@ aspectRatio: '16/9' # real width of the canvas, unit in px canvasWidth: 980 +# favicon, can be a local file path or URL +favicon: 'https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png' # fonts will be auto imported from Google fonts # Learn more: https://sli.dev/custom/fonts fonts: From 871a293da7f02bedf8804133bf6a4af060611eb0 Mon Sep 17 00:00:00 2001 From: Augustine Date: Wed, 16 Feb 2022 22:06:17 +0800 Subject: [PATCH 012/134] docs: update shiki URL (#54) --- guide/syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/syntax.md b/guide/syntax.md index a885c67..e82c3ea 100644 --- a/guide/syntax.md +++ b/guide/syntax.md @@ -72,7 +72,7 @@ console.log('Hello, World!') //``` ~~~ -We support [Prism](http://prismjs.com) and [Shiki](https://github.com/shiki/shiki) as syntax highlighters. Refer to [the highlighters section](/custom/highlighters) for more details. +We support [Prism](http://prismjs.com) and [Shiki](https://github.com/shikijs/shiki) as syntax highlighters. Refer to [the highlighters section](/custom/highlighters) for more details. ### Line Highlighting From 5b4af788678dc110e79241e2109414652f9b71dc Mon Sep 17 00:00:00 2001 From: Alexander Eble <35292572+alexanderdavide@users.noreply.github.com> Date: Mon, 7 Mar 2022 23:20:37 +0100 Subject: [PATCH 013/134] Add slidev-theme-academic (#55) --- .vitepress/themes.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.vitepress/themes.ts b/.vitepress/themes.ts index 9c285e0..1090423 100644 --- a/.vitepress/themes.ts +++ b/.vitepress/themes.ts @@ -315,6 +315,29 @@ export const community: ThemeInfo[] = [ 'light', ], }, + { + id: 'slidev-theme-academic', + name: 'Academic', + description: 'Academic presentations with Slidev made simple', + author: { + name: 'Alexander Eble', + link: 'https://github.com/alexanderdavide', + }, + repo: 'https://github.com/alexanderdavide/slidev-theme-academic', + previews: [ + 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/01.png', + 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/02.png', + 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/03.png', + 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/04.png', + 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/05.png', + 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/06.png', + 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/07.png', + ], + tags: [ + 'dark', + 'light', + ], + }, // Add yours here! { id: '', From 61b06f20d904b70a8b14d4b69879ed25d0f08510 Mon Sep 17 00:00:00 2001 From: Alexander Eble <35292572+alexanderdavide@users.noreply.github.com> Date: Mon, 7 Mar 2022 23:21:36 +0100 Subject: [PATCH 014/134] Add showcase Git's Most Wanted (#56) --- .vitepress/showcases.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.vitepress/showcases.ts b/.vitepress/showcases.ts index dd7136b..e8e1242 100644 --- a/.vitepress/showcases.ts +++ b/.vitepress/showcases.ts @@ -108,6 +108,18 @@ export const showcases: ShowCaseInfo[] = [ at: 'Thoughtworks Internal Lunch & Learn', datetime: '2021-11-12', }, + { + title: 'Git\'s Most Wanted', + cover: 'https://cdn.jsdelivr.net/gh/alexanderdavide/git-most-wanted@assets/slides-export/01.png', + author: { + name: 'Alexander Eble', + link: 'https://github.com/alexanderdavide', + }, + slidesLink: 'https://git-most-wanted.alex-eble.de', + sourceLink: 'https://github.com/alexanderdavide/git-most-wanted', + at: 'Internal Tech Talk', + datetime: '2022-03-11', + }, // Add yours here! { title: 'Yours?', From e9cccdbd077d1ac7b5667b48fab66e5c0f9b5d37 Mon Sep 17 00:00:00 2001 From: tangramor Date: Wed, 16 Mar 2022 15:13:52 +0800 Subject: [PATCH 015/134] feat: update install.md to fix the missed docker part (#57) --- guide/install.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/guide/install.md b/guide/install.md index 29988f0..2dc43fd 100644 --- a/guide/install.md +++ b/guide/install.md @@ -62,6 +62,67 @@ This command will also try to use local `@slidev/cli` if it has been found in th ## Install on Docker -If you need a rapid way to run a presentation with containers, you can use the prebuilt [docker](https://hub.docker.com/r/stig124/slidev) image maintained by [stig124](https://github.com/Stig124), or build your own. +If you need a rapid way to run a presentation with containers, you can use the prebuilt [docker](https://hub.docker.com/r/tangramor/slidev) image maintained by [tangramor](https://github.com/tangramor), or build your own. -Refer to the [slidevjs/container repo](https://github.com/slidevjs/container) for more details. +Just run following command in your work folder: + +```bash +docker run --name slidev --rm -it \ + --user node \ + -v ${PWD}:/slidev \ + -p 3030:3030 \ + tangramor/slidev:latest +``` + +If your work folder is empty, it will generate a template `slides.md` and other related files under your work folder, and launch the server on port `3030`. + +You can access your slides from http://localhost:3030/ + + +### Build deployable image + +Or you can create your own slidev project to a docker image with Dockerfile: + +```Dockerfile +FROM tangramor/slidev:latest + +ADD . /slidev + +``` + +Create the docker image: `docker build -t myppt .` + +And run the container: `docker run --name myslides --rm --user node -p 3030:3030 myppt` + +You can visit your slides from http://localhost:3030/ + + +### Build hostable SPA (Single Page Application) + +Run command `docker exec -i slidev npx slidev build` on the running container `slidev`. It will generate static HTML files under `dist` folder. + +You can host `dist` in a static web site such as [Github pages](https://tangramor.github.io/slidev_docker/) or Gitlab pages. Because in Github pages the url may contain subfolder, so you need to modify the generated `index.html` to change `href="/assets/xxx` to `href="./assets/xxx`. And to avoid Jekyll build process, you need to add an empty file `.nojekyll`. + +You can also host it by yourself: + +```bash +docker run --name myslides --rm -p 80:80 -v ${PWD}/dist:/usr/share/nginx/html nginx:alpine +``` + +Or create a static image with following Dockerfile: + +```Dockerfile +FROM nginx:alpine + +COPY dist /usr/share/nginx/html + +``` + +Create the docker image: `docker build -t mystaticppt .` + +And run the container: `docker run --name myslides --rm -p 80:80 mystaticppt` + +You can visit your slids from http://localhost/ + + +Refer to the [tangramor/slidev_docker](https://github.com/tangramor/slidev_docker) for more details. From 1abac97d69f2a4c1bf1ea213947287922b7adba4 Mon Sep 17 00:00:00 2001 From: tangramor Date: Wed, 16 Mar 2022 18:53:55 +0800 Subject: [PATCH 016/134] Update install.md to fix typos about docker section (#58) --- guide/install.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/guide/install.md b/guide/install.md index 2dc43fd..c1e7157 100644 --- a/guide/install.md +++ b/guide/install.md @@ -101,9 +101,19 @@ You can visit your slides from http://localhost:3030/ Run command `docker exec -i slidev npx slidev build` on the running container `slidev`. It will generate static HTML files under `dist` folder. -You can host `dist` in a static web site such as [Github pages](https://tangramor.github.io/slidev_docker/) or Gitlab pages. Because in Github pages the url may contain subfolder, so you need to modify the generated `index.html` to change `href="/assets/xxx` to `href="./assets/xxx`. And to avoid Jekyll build process, you need to add an empty file `.nojekyll`. -You can also host it by yourself: +#### Host on Github Pages + +You can host `dist` in a static web site such as [Github Pages](https://tangramor.github.io/slidev_docker/) or Gitlab Pages. + +Because in Github pages the url may contain subfolder, so you need to modify the generated `index.html` to change `href="/assets/xxx` to `href="./assets/xxx`. Or you may use `--base=//` option during the build process, such as: `docker exec -i slidev npx slidev build --base=/slidev_docker/`. + +And to avoid Jekyll build process, you need to add an empty file `.nojekyll`. + + +#### Host by docker + +You can also host it by yourself with docker: ```bash docker run --name myslides --rm -p 80:80 -v ${PWD}/dist:/usr/share/nginx/html nginx:alpine @@ -122,7 +132,7 @@ Create the docker image: `docker build -t mystaticppt .` And run the container: `docker run --name myslides --rm -p 80:80 mystaticppt` -You can visit your slids from http://localhost/ +You can visit your slides from http://localhost/ Refer to the [tangramor/slidev_docker](https://github.com/tangramor/slidev_docker) for more details. From b18d6f476b18393dabf793d2f08d22f243683948 Mon Sep 17 00:00:00 2001 From: Alex Liu Date: Tue, 22 Mar 2022 10:53:21 +0800 Subject: [PATCH 017/134] docs: add custom-nav-controls documents (#60) --- custom/global-layers.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/custom/global-layers.md b/custom/global-layers.md index e907c8f..f5388cf 100644 --- a/custom/global-layers.md +++ b/custom/global-layers.md @@ -4,13 +4,15 @@ Global layers allow you to have custom components that **persistent** across slides. This could be useful for having footers, cross-slides animations, global effects, etc. -Slidev provides two layers for this usage, create `global-top.vue` or `global-bottom.vue` under your project root and it will pick up automatically. +Slidev provides three layers for this usage, create `global-top.vue`, `global-bottom.vue` or `custom-nav-controls.vue` under your project root and it will pick up automatically. Layers relationship: - Global Top (`global-top.vue`) - Slides - Global Bottom (`global-bottom.vue`) +- NavControls + - Customized Navigation Controls (`custom-nav-controls.vue`) ## Example @@ -23,6 +25,17 @@ Layers relationship: The text `Your Name` will appear to all your slides. +```html + + +``` + +The button `Next` will appear in NavControls. + To enabled it conditionally, you can apply it with the [Vue Global Context](/custom/vue-context). ```html @@ -60,3 +73,13 @@ To enabled it conditionally, you can apply it with the [Vue Global Context](/cus ``` + +```html + + + +``` From d68398ac58d3e8efc2f6d29119938f4a4382f617 Mon Sep 17 00:00:00 2001 From: Ruy Adorno Date: Fri, 25 Mar 2022 12:56:21 -0400 Subject: [PATCH 018/134] docs: add mention to --dark option when exporting (#61) --- guide/exporting.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guide/exporting.md b/guide/exporting.md index 398969d..86df8df 100644 --- a/guide/exporting.md +++ b/guide/exporting.md @@ -19,6 +19,12 @@ $ slidev export After a few seconds, your slides will be ready at `./slides-exports.pdf`. +In case you want to export your slides using the dark version of the theme, use the `--dark` option: + +```bash +$ slidev export --dark +``` + ### Export Clicks Steps > Available since v0.21 From 9fa6829bca1bd8a2262cbc20eb2759d08a0f11fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Emonet?= Date: Wed, 13 Apr 2022 10:41:52 +0200 Subject: [PATCH 019/134] fix: correct typo in the name of the generated pdf (#62) --- guide/exporting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/exporting.md b/guide/exporting.md index 86df8df..5ee1fb0 100644 --- a/guide/exporting.md +++ b/guide/exporting.md @@ -17,7 +17,7 @@ Now export your slides to PDF using the following command $ slidev export ``` -After a few seconds, your slides will be ready at `./slides-exports.pdf`. +After a few seconds, your slides will be ready at `./slides-export.pdf`. In case you want to export your slides using the dark version of the theme, use the `--dark` option: From 73087998518d8ebb02773f5f2ee6959d7255a222 Mon Sep 17 00:00:00 2001 From: Alexander Eble <35292572+alexanderdavide@users.noreply.github.com> Date: Thu, 14 Apr 2022 03:46:18 +0200 Subject: [PATCH 020/134] Document parameter listClass of Toc (#63) --- builtin/components.md | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/components.md b/builtin/components.md index b957d8e..016202a 100644 --- a/builtin/components.md +++ b/builtin/components.md @@ -33,6 +33,7 @@ hideInToc: true Parameters: * `columns` (`string | number`, default: `1`): The number of columns of the display +* `listClass` (`string | string[]`, default: `''`): Classes to apply to the table of contents list * `maxDepth` (`string | number`, default: `Infinity`): The maximum depth level of title to display * `minDepth` (`string | number`, default: `1`): The minimum depth level of title to display * `mode` (`'all' | 'onlyCurrentTree'| 'onlySiblings'`, default: `'all'`): From 0daa359721a2cdbb0abac8fc5f5e1c00dd7b4452 Mon Sep 17 00:00:00 2001 From: Tony Cabaye Date: Thu, 14 Apr 2022 10:59:55 +0200 Subject: [PATCH 021/134] feat: add doc for Titles and Link components (#64) --- builtin/components.md | 63 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 12 deletions(-) diff --git a/builtin/components.md b/builtin/components.md index 016202a..e07348d 100644 --- a/builtin/components.md +++ b/builtin/components.md @@ -4,28 +4,21 @@ > The documentations of this section is still working in progress. Before that, you can take a look at the [source code](https://github.com/slidevjs/slidev/blob/main/packages/client/builtin) directly. -### `TOC` +### `Toc` Insert a Table Of Content. -Titles and title levels get automatically retrieved from the first title element of each slides. - -You can override this automatic behaviour for a slide by using the front matter syntax: -```yml ---- -title: Amazing slide title -level: 2 ---- -``` - -Or if you prefer the slide to not appear in the TOC at all, you can use: +If you want a slide to not appear in the `` component, you can use in the front matter block of the slide: ```yml --- hideInToc: true --- ``` +Titles are displayed using the [`` component](#titles) + #### Usage + ~~~md ~~~ @@ -41,6 +34,52 @@ Parameters: * `'onlyCurrentTree'`: Display only items that are in current tree (active item, parents and children of active item) * `'onlySiblings'`: Display only items that are in current tree and their direct siblings +### `Link` + +Insert a link you can use to navigate to a given slide. + +#### Usage + +~~~md +Go to slide 42 + +~~~ + +Parameters: + +* `to` (`string | number`): The path of the slide to navigate to (slides starts from `1`) +* `title` (`string`): The title to display + +### `Titles` + +Insert the main title from a slide parsed as HTML. + +Titles and title levels get automatically retrieved from the first title element of each slides. + +You can override this automatic behaviour for a slide by using the front matter syntax: +```yml +--- +title: Amazing slide title +level: 2 +--- +``` + +#### Usage + +The `` component is a virtual component you can import with: +```js +import Titles from '/@slidev/titles.md' +``` + +Then you can use it with: +~~~md + +~~~ + +Parameters: + +* `no` (`string | number`): The number of the slide to display the title from (slides starts from `1`) + ## Custom Components Create a directory `components/` under your project root, and simply put your custom Vue components under it, then you can use it with the same name in your markdown file! From 37797ff651c1914f542e82bc6a10f8450281fad5 Mon Sep 17 00:00:00 2001 From: Tony Cabaye Date: Fri, 15 Apr 2022 08:52:17 +0200 Subject: [PATCH 022/134] feat: update config doc (#65) --- custom/index.md | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/custom/index.md b/custom/index.md index 33b9bab..64a8b4d 100644 --- a/custom/index.md +++ b/custom/index.md @@ -11,30 +11,45 @@ You can configure Slidev in the frontmatter of your first slide, the following s # theme id or package name theme: 'default' # title of your slide, will auto infer from the first header if not specified -title: '' +title: 'Slidev' # titleTemplate for the webpage, `%s` will be replaced by the page's title titleTemplate: '%s - Slidev' +# information for your slides, can be a markdown string +info: false # enabled pdf downloading in SPA build, can also be a custom url -download: true +download: false +# filename of the export file +exportFilename: 'slidev-exported.pdf' # syntax highlighter, can be 'prism' or 'shiki' highlighter: 'prism' # show line numbers in code blocks lineNumbers: false -# enable monaco editor, default to dev only +# enable monaco editor, can be boolean, 'dev' or 'build' monaco: 'dev' +# download remote assets in local using vite-plugin-remote-assets, can be boolean, 'dev' or 'build' +remoteAssets: false +# controls whether texts in slides are selectable +selectable: true +# enable slide recording, can be boolean, 'dev' or 'build' +record: 'dev' -# force color schema for the slides, could be 'auto', 'light', or 'dark' +# force color schema for the slides, can be 'auto', 'light', or 'dark' colorSchema: 'auto' -# router mode for vue-router, could be "history" or "hash" +# router mode for vue-router, can be "history" or "hash" routerMode: 'history' # aspect ratio for the slides aspectRatio: '16/9' # real width of the canvas, unit in px canvasWidth: 980 +# used for theme customization, will inject root styles as `--slidev-theme-x` for attribute `x` +themeConfig: + primary: '#5d8392' # favicon, can be a local file path or URL favicon: 'https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png' +# URL of PlantUML server used to render diagrams +plantUmlServer: 'https://www.plantuml.com/plantuml' # fonts will be auto imported from Google fonts # Learn more: https://sli.dev/custom/fonts fonts: @@ -47,10 +62,13 @@ defaults: layout: 'default' # ... -# information for your slides, can be a markdown string -info: | - ## Slidev - My first [Slidev](http://sli.dev/) presentations! +# drawing options +# Learn more: https://sli.dev/guide/drawing.html +drawings: + enabled: true + persist: false + presenterOnly: false + syncAll: true --- ``` From 030576270f137f7a9f12dda14c167d21a7eb432c Mon Sep 17 00:00:00 2001 From: Alexander Eble <35292572+alexanderdavide@users.noreply.github.com> Date: Mon, 25 Apr 2022 05:31:27 +0200 Subject: [PATCH 023/134] docs: update previews of slidev-theme-academic (#66) --- .vitepress/themes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vitepress/themes.ts b/.vitepress/themes.ts index 1090423..df153c6 100644 --- a/.vitepress/themes.ts +++ b/.vitepress/themes.ts @@ -327,7 +327,7 @@ export const community: ThemeInfo[] = [ previews: [ 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/01.png', 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/02.png', - 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/03.png', + 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/08.png', 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/04.png', 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/05.png', 'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/06.png', From 87e46ef57643c3aa0f8551691b431a7cec3ed0c4 Mon Sep 17 00:00:00 2001 From: Tony Cabaye Date: Thu, 19 May 2022 11:15:57 +0200 Subject: [PATCH 024/134] feat: add doc for CLI commands (#67) --- custom/index.md | 1 + guide/install.md | 86 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/custom/index.md b/custom/index.md index 64a8b4d..faddfd7 100644 --- a/custom/index.md +++ b/custom/index.md @@ -9,6 +9,7 @@ You can configure Slidev in the frontmatter of your first slide, the following s ```yaml --- # theme id or package name +# Learn more: https://sli.dev/themes/use.html theme: 'default' # title of your slide, will auto infer from the first header if not specified title: 'Slidev' diff --git a/guide/install.md b/guide/install.md index c1e7157..fd7f85c 100644 --- a/guide/install.md +++ b/guide/install.md @@ -136,3 +136,89 @@ You can visit your slides from http://localhost/ Refer to the [tangramor/slidev_docker](https://github.com/tangramor/slidev_docker) for more details. + +### Command Line Interface (CLI) + +`@slidev/cli` Expose a few commands you can use with `npx slidev ...` or by adding scripts in your `package.json`: +```json +{ + "script": { + "dev": "slidev" + } +} +``` + +In that case you will be able to run `npm run dev`. + +You can pass options to any commands: + +* boolean option are `true` if they are present, false otherwise (example: `slidev --open`) +* some options can have values you can add just after the option or by using the `=` character (example: `slidev --port 8080` or `slidev --port=8080`) + +If you use npm scripts, don't forget to add `--` after the npm command: +```bash +npm run slidev -- --open +``` + +#### `slidev [entry]` + +Start a local server for Slidev. + +* `[entry]` (`string`, default: `slides.md`): path to the slides markdown entry. + +Options: + +* `--port`, `-p` (`number`, default: `3030`): port number. +* `--open`, `-o` (`boolean`, default: `false`): open in browser. +* `--remote [password]` (`string`): listen to public host and enable remote control, if a value is passed then the presenter mode is private and only accessible by passing the given password in the URL query `password` parameter. +* `--log` (`'error', 'warn', 'info', 'silent'`, default: `'warn'`): Log level. +* `--force`, `-f` (`boolean`, default `false`): force the optimizer to ignore the cache and re-bundle. +* `--theme`, `-t` (`string`): override theme. + +#### `slidev build [entry]` + +Build hostable SPA. + +* `[entry]` (`string`, default: `slides.md`): path to the slides markdown entry. + +Options: + +* `--watch`, `-w` (`boolean`, default: `false`): build watch. +* `--out`, `-o` (`string`, default: `dist`): output dir. +* `--base` (`string`, default: `/`): base URL (see https://cli.vuejs.org/config/#publicpath) +* `--download` (`boolean`, default: `false`): allow to download the slides as PDF inside the SPA. +* `--theme`, `-t` (`string`): override theme. + +#### `slidev export [entry]` + +Export slides to PDF (or other format). + +* `[entry]` (`string`, default: `slides.md`): path to the slides markdown entry. + +Options: + +* `--output` (`string`, default: use `exportFilename` (see https://sli.dev/custom/#frontmatter-configures) or use `[entry]-export`): path to the output. +* `--base` (`'pdf', 'png', 'md'`, default: `'pdf'`): output format. +* `--timeout` (`number`, default: `30000`): timeout for rendering the print page (see https://playwright.dev/docs/api/class-page#page-goto). +* `--range` (`string`): page ranges to export (example: `'1,4-5,6'`). +* `--dark` (`boolean`, default: `false`): export as dark theme. +* `--with-clicks`, `-c` (`boolean`, default: `false`): export pages for every clicks (see https://sli.dev/guide/animations.html#click-animations). +* `--theme`, `-t` (`string`): override theme. + +#### `slidev format [entry]` + +Format the markdown file. + +* `[entry]` (`string`, default: `slides.md`): path to the slides markdown entry. + +#### `slidev theme [subcommand]` + +Theme related operations. + +Subcommands: + +* `eject [entry]`: Eject current theme into local file system + * `[entry]` (`string`, default: `slides.md`): path to the slides markdown entry. + * Options: + * `--dir` (`string`, default: `theme`): output dir. + * `--theme`, `-t` (`string`): override theme. From 017f644e8a13bbfaaadda40c0b1fdf54ddb284a0 Mon Sep 17 00:00:00 2001 From: Haili Zhang Date: Sun, 22 May 2022 16:57:40 +0800 Subject: [PATCH 025/134] doc: propose a new showcase (#68) --- .vitepress/showcases.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.vitepress/showcases.ts b/.vitepress/showcases.ts index e8e1242..7c4c6fa 100644 --- a/.vitepress/showcases.ts +++ b/.vitepress/showcases.ts @@ -120,6 +120,18 @@ export const showcases: ShowCaseInfo[] = [ at: 'Internal Tech Talk', datetime: '2022-03-11', }, + { + title: 'OpenFunction 202', + cover: 'https://s2.loli.net/2022/05/22/4zsCnkQRFoAU1E5.png', + author: { + name: 'Haili Zhang', + link: 'https://github.com/webup', + }, + slidesLink: 'https://openfunction-talks.netlify.app/2022/202-node-async/', + sourceLink: 'https://github.com/webup/openfunction-talks/tree/main/202-node-async', + at: 'OpenFunction Tutorial Sharing', + datetime: '2022-05-08', + }, // Add yours here! { title: 'Yours?', From afa4515b72ea8814d0a633bdb4ec4c41734b502c Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Wed, 25 May 2022 00:43:40 +0300 Subject: [PATCH 026/134] docs: typo with NavControls action description (#69) --- custom/global-layers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/global-layers.md b/custom/global-layers.md index f5388cf..12579f9 100644 --- a/custom/global-layers.md +++ b/custom/global-layers.md @@ -36,7 +36,7 @@ The text `Your Name` will appear to all your slides. The button `Next` will appear in NavControls. -To enabled it conditionally, you can apply it with the [Vue Global Context](/custom/vue-context). +To enable it conditionally, you can apply it with the [Vue Global Context](/custom/vue-context). ```html From 18216961c9b829103d7ee5bc6c426cb525c3d51c Mon Sep 17 00:00:00 2001 From: Tony Cabaye Date: Wed, 25 May 2022 11:18:56 +0200 Subject: [PATCH 027/134] feat: addons doc (#71) * fix: title levels * feat: add addons doc * fix: remove compiler macro warnings --- .vitepress/config.js | 20 ++++++ .../theme/components/AlgoliaSearchBox.vue | 2 +- .../theme/components/BooleanDisplay.vue | 2 +- .vitepress/theme/components/Environment.vue | 2 - .vitepress/theme/components/NavBar.vue | 3 +- .../theme/components/NavDropdownLink.vue | 2 +- .../theme/components/NavDropdownLinkItem.vue | 2 +- .vitepress/theme/components/NavLink.vue | 2 +- .vitepress/theme/components/ShowCaseInfo.vue | 1 - .vitepress/theme/components/SideBar.vue | 1 - .vitepress/theme/components/ThemeGallery.vue | 2 +- .vitepress/theme/components/ThemeInfo.vue | 2 +- .vitepress/theme/components/Tweet.vue | 2 +- TRANSLATIONS.md | 5 ++ addons/use.md | 38 ++++++++++ addons/write-an-addon.md | 71 +++++++++++++++++++ guide/install.md | 12 ++-- 17 files changed, 149 insertions(+), 20 deletions(-) create mode 100644 addons/use.md create mode 100644 addons/write-an-addon.md diff --git a/.vitepress/config.js b/.vitepress/config.js index 915337d..c5b3569 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.js @@ -70,6 +70,17 @@ const Theme = [ }, ] +const Addon = [ + { + text: 'Use Addon', + link: '/addons/use', + }, + { + text: 'Write an Addon', + link: '/addons/write-an-addon', + }, +] + const Translations = [ { text: 'English', @@ -191,6 +202,10 @@ const slidebars = [ text: 'Themes', children: Theme, }, + { + text: 'Addons', + children: Addon, + }, { text: 'Customizations', children: Customizations, @@ -254,6 +269,10 @@ module.exports = { text: 'Theme', items: Theme, }, + { + text: 'Addon', + items: Addon, + }, { text: 'Customize', items: Customizations, @@ -271,6 +290,7 @@ module.exports = { sidebar: { '/guide/': slidebars, '/themes/': slidebars, + '/addons/': slidebars, '/custom/': slidebars, '/builtin/': slidebars, '/resources/': slidebars, diff --git a/.vitepress/theme/components/AlgoliaSearchBox.vue b/.vitepress/theme/components/AlgoliaSearchBox.vue index 3961a51..b9a5b7f 100644 --- a/.vitepress/theme/components/AlgoliaSearchBox.vue +++ b/.vitepress/theme/components/AlgoliaSearchBox.vue @@ -5,7 +5,7 @@ diff --git a/.vitepress/theme/components/NavBar.vue b/.vitepress/theme/components/NavBar.vue index 5ba8c8d..ed00270 100644 --- a/.vitepress/theme/components/NavBar.vue +++ b/.vitepress/theme/components/NavBar.vue @@ -39,7 +39,6 @@ diff --git a/.vitepress/theme/components/HomeHero.vue b/.vitepress/theme/components/HomeHero.vue index 8bcbfff..efbc158 100644 --- a/.vitepress/theme/components/HomeHero.vue +++ b/.vitepress/theme/components/HomeHero.vue @@ -17,14 +17,14 @@ @@ -51,19 +51,19 @@ + - + + diff --git a/.vitepress/theme/NotFound.vue b/.vitepress/theme/NotFound.vue index 13494d3..bfaacb6 100644 --- a/.vitepress/theme/NotFound.vue +++ b/.vitepress/theme/NotFound.vue @@ -1,15 +1,7 @@ - - + + diff --git a/.vitepress/theme/components/AlgoliaSearchBox.vue b/.vitepress/theme/components/AlgoliaSearchBox.vue deleted file mode 100644 index 9561cb3..0000000 --- a/.vitepress/theme/components/AlgoliaSearchBox.vue +++ /dev/null @@ -1,123 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/BooleanDisplay.vue b/.vitepress/theme/components/BooleanDisplay.vue index 3a876f2..d51afbc 100644 --- a/.vitepress/theme/components/BooleanDisplay.vue +++ b/.vitepress/theme/components/BooleanDisplay.vue @@ -1,6 +1,4 @@ + + diff --git a/.vitepress/theme/components/DemoContainer.vue b/.vitepress/theme/components/DemoContainer.vue index 9d2b56f..1ea93e1 100644 --- a/.vitepress/theme/components/DemoContainer.vue +++ b/.vitepress/theme/components/DemoContainer.vue @@ -1,18 +1,18 @@ - - + + diff --git a/.vitepress/theme/components/EditLink.vue b/.vitepress/theme/components/EditLink.vue deleted file mode 100644 index 7504e01..0000000 --- a/.vitepress/theme/components/EditLink.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/Home.vue b/.vitepress/theme/components/Home.vue deleted file mode 100644 index 59b6eff..0000000 --- a/.vitepress/theme/components/Home.vue +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/HomeFeatures.vue b/.vitepress/theme/components/HomeFeatures.vue deleted file mode 100644 index 292bc99..0000000 --- a/.vitepress/theme/components/HomeFeatures.vue +++ /dev/null @@ -1,137 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/HomeFooter.vue b/.vitepress/theme/components/HomeFooter.vue deleted file mode 100644 index 678be92..0000000 --- a/.vitepress/theme/components/HomeFooter.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - diff --git a/.vitepress/theme/components/HomeHero.vue b/.vitepress/theme/components/HomeHero.vue deleted file mode 100644 index efbc158..0000000 --- a/.vitepress/theme/components/HomeHero.vue +++ /dev/null @@ -1,174 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/LastUpdated.vue b/.vitepress/theme/components/LastUpdated.vue deleted file mode 100644 index c899316..0000000 --- a/.vitepress/theme/components/LastUpdated.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/NavBar.vue b/.vitepress/theme/components/NavBar.vue deleted file mode 100644 index ed00270..0000000 --- a/.vitepress/theme/components/NavBar.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/NavBarTitle.vue b/.vitepress/theme/components/NavBarTitle.vue deleted file mode 100644 index 5c4ca6f..0000000 --- a/.vitepress/theme/components/NavBarTitle.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/NavDropdownLink.vue b/.vitepress/theme/components/NavDropdownLink.vue deleted file mode 100644 index 6422ce9..0000000 --- a/.vitepress/theme/components/NavDropdownLink.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/NavDropdownLinkItem.vue b/.vitepress/theme/components/NavDropdownLinkItem.vue deleted file mode 100644 index cd8064a..0000000 --- a/.vitepress/theme/components/NavDropdownLinkItem.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/NavLink.vue b/.vitepress/theme/components/NavLink.vue deleted file mode 100644 index f48f4dc..0000000 --- a/.vitepress/theme/components/NavLink.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/NavLinks.vue b/.vitepress/theme/components/NavLinks.vue deleted file mode 100644 index 6be0326..0000000 --- a/.vitepress/theme/components/NavLinks.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/NextAndPrevLinks.vue b/.vitepress/theme/components/NextAndPrevLinks.vue deleted file mode 100644 index dcfea07..0000000 --- a/.vitepress/theme/components/NextAndPrevLinks.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/Note.vue b/.vitepress/theme/components/Note.vue deleted file mode 100644 index 0329e9f..0000000 --- a/.vitepress/theme/components/Note.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/.vitepress/theme/components/Page.vue b/.vitepress/theme/components/Page.vue deleted file mode 100644 index f622cb9..0000000 --- a/.vitepress/theme/components/Page.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/PageFooter.vue b/.vitepress/theme/components/PageFooter.vue deleted file mode 100644 index 34e8ab6..0000000 --- a/.vitepress/theme/components/PageFooter.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/ShowCaseInfo.vue b/.vitepress/theme/components/ShowCaseInfo.vue index 74ea1f9..8f0a87a 100644 --- a/.vitepress/theme/components/ShowCaseInfo.vue +++ b/.vitepress/theme/components/ShowCaseInfo.vue @@ -8,14 +8,14 @@ defineProps<{ diff --git a/.vitepress/theme/components/SideBar.vue b/.vitepress/theme/components/SideBar.vue deleted file mode 100644 index 5c7fc8e..0000000 --- a/.vitepress/theme/components/SideBar.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/SideBarLink.ts b/.vitepress/theme/components/SideBarLink.ts deleted file mode 100644 index 14247f0..0000000 --- a/.vitepress/theme/components/SideBarLink.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { FunctionalComponent, h, VNode } from 'vue' -import { useRoute, useData } from 'vitepress' -import { DefaultTheme } from '../config' -import { joinUrl, isActive } from '../utils' - -export interface Header { - level: number - title: string - slug: string -} - -interface HeaderWithChildren extends Header { - children?: Header[] -} - -export const SideBarLink: FunctionalComponent<{ - item: DefaultTheme.SideBarItem -}> = (props) => { - const route = useRoute() - const {site} = useData() - - const headers = route.data.headers - const text = props.item.text - const link = resolveLink(site.value.base, props.item.link) - const children = (props.item as DefaultTheme.SideBarGroup).children - const active = isActive(route, props.item.link) - const childItems = createChildren(active, children, headers) - - return h('li', { class: 'sidebar-link' }, [ - h( - link ? 'a' : 'p', - { - class: { 'sidebar-link-item': true, active }, - href: link, - }, - text, - ), - childItems, - ]) -} - -function resolveLink(base: string, path?: string): string | undefined { - if (path === undefined) - return path - - // keep relative hash to the same page - if (path.startsWith('#')) - return path - - return joinUrl(base, path) -} - -function createChildren( - active: boolean, - children?: DefaultTheme.SideBarItem[], - headers?: Header[], -): VNode | null { - if (children && children.length > 0) { - return h( - 'ul', - { class: 'sidebar-links' }, - children.map((c) => { - return h(SideBarLink, { item: c }) - }), - ) - } - - return active && headers - ? createChildren(false, resolveHeaders(headers)) - : null -} - -function resolveHeaders(headers: Header[]): DefaultTheme.SideBarItem[] { - return mapHeaders(groupHeaders(headers)) -} - -function groupHeaders(headers: Header[]): HeaderWithChildren[] { - headers = headers.map(h => Object.assign({}, h)) - let lastH2: HeaderWithChildren - headers.forEach((h) => { - if (h.level === 2) - lastH2 = h - - else if (lastH2) - (lastH2.children || (lastH2.children = [])).push(h) - }) - return headers.filter(h => h.level === 2) -} - -function mapHeaders(headers: HeaderWithChildren[]): DefaultTheme.SideBarItem[] { - return headers.map(header => ({ - text: header.title, - link: `#${header.slug}`, - children: header.children ? mapHeaders(header.children) : undefined, - })) -} diff --git a/.vitepress/theme/components/SideBarLinks.vue b/.vitepress/theme/components/SideBarLinks.vue deleted file mode 100644 index 77aea38..0000000 --- a/.vitepress/theme/components/SideBarLinks.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/.vitepress/theme/components/ThemeGallery.vue b/.vitepress/theme/components/ThemeGallery.vue index b7fe1f9..ee92e0c 100644 --- a/.vitepress/theme/components/ThemeGallery.vue +++ b/.vitepress/theme/components/ThemeGallery.vue @@ -1,10 +1,10 @@ + - - @@ -429,6 +459,22 @@ This shows on the right This shows on the left ``` +## Import Code Snippets + +> Available since v0.47.0 + +You can import code snippets from existing files via following syntax: + +```md +<<< @/snippets/snippet.js +``` + +::: ttp +The value of `@` corresponds to the source root, the directory where the `slides.md` is located. +::: + +This feature is vendored from VitePress, learn more about it in [VitePress's documentation](https://vitepress.dev/guide/markdown#import-code-snippets). + ## Configurations All configurations needed can be defined in the Markdown file. For example: diff --git a/guide/why.md b/guide/why.md index 01c5ac2..20a4ab6 100644 --- a/guide/why.md +++ b/guide/why.md @@ -66,6 +66,4 @@ $ npm init slidev Or have a quick preview of it: -
- -
+ diff --git a/package.json b/package.json index 482f06e..457b3b1 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "devDependencies": { "@antfu/eslint-config": "^2.6.3", "@iconify/json": "^2.2.178", + "@shikijs/vitepress-twoslash": "1.0.0-beta.5", "@slidev/client": "0.34.3", "@slidev/parser": "0.34.3", "@slidev/theme-default": "0.21.2", @@ -26,13 +27,12 @@ "eslint": "^8.56.0", "fs-extra": "^11.2.0", "markdown-it": "^14.0.0", - "shiki": "1.0.0-beta.5", + "shiki": "^1.0.0-beta.5", "typescript": "^5.3.3", "unocss": "^0.58.4", "unplugin-icons": "^0.18.3", "unplugin-vue-components": "^0.26.0", "vite-plugin-inspect": "^0.8.3", - "vitepress": "^1.0.0-rc.41", - "windicss": "^3.5.6" + "vitepress": "^1.0.0-rc.41" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b866f17..5e5f60b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,6 +22,9 @@ devDependencies: '@iconify/json': specifier: ^2.2.178 version: 2.2.178 + '@shikijs/vitepress-twoslash': + specifier: 1.0.0-beta.5 + version: 1.0.0-beta.5(typescript@5.3.3) '@slidev/client': specifier: 0.34.3 version: 0.34.3(typescript@5.3.3)(vite@3.2.8) @@ -53,7 +56,7 @@ devDependencies: specifier: ^14.0.0 version: 14.0.0 shiki: - specifier: 1.0.0-beta.5 + specifier: ^1.0.0-beta.5 version: 1.0.0-beta.5 typescript: specifier: ^5.3.3 @@ -73,9 +76,6 @@ devDependencies: vitepress: specifier: ^1.0.0-rc.41 version: 1.0.0-rc.41(@algolia/client-search@4.22.1)(@types/node@18.19.14)(postcss@8.4.33)(search-insights@2.13.0)(typescript@5.3.3) - windicss: - specifier: ^3.5.6 - version: 3.5.6 packages: @@ -983,6 +983,22 @@ packages: engines: {node: '>=14'} dev: true + /@floating-ui/core@1.6.0: + resolution: {integrity: sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==} + dependencies: + '@floating-ui/utils': 0.2.1 + dev: true + + /@floating-ui/dom@1.1.1: + resolution: {integrity: sha512-TpIO93+DIujg3g7SykEAGZMDtbJRrmnYRCNYSjJlvIbGhBjRSNTLVbNeDQBrzy9qDgUbiWdc7KA0uZHZ2tJmiw==} + dependencies: + '@floating-ui/core': 1.6.0 + dev: true + + /@floating-ui/utils@0.2.1: + resolution: {integrity: sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==} + dev: true + /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} @@ -1295,6 +1311,33 @@ packages: shiki: 1.0.0-beta.4 dev: true + /@shikijs/twoslash@1.0.0-beta.5(typescript@5.3.3): + resolution: {integrity: sha512-BPn2PFgy6Bon/hWU52ELWeGrdO1lsuR6ZIhTTDw4q+GrOZQsVDkdNlhIjoanGv1UY95dlbTEuPqXtzmk+4O73Q==} + dependencies: + '@shikijs/core': 1.0.0-beta.5 + twoslash: 0.1.0(typescript@5.3.3) + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@shikijs/vitepress-twoslash@1.0.0-beta.5(typescript@5.3.3): + resolution: {integrity: sha512-FBjhz1sgSVNepZgPIk3jxPfI4tTVr+hCbR3niVQHrm9hgdqBBoU3cU3TUS3yB+7GJArGJAFrCtYUxsU9g/mUaQ==} + dependencies: + '@shikijs/twoslash': 1.0.0-beta.5(typescript@5.3.3) + floating-vue: 5.2.2(vue@3.4.15) + mdast-util-from-markdown: 2.0.0 + mdast-util-gfm: 3.0.0 + mdast-util-to-hast: 13.1.0 + shiki: 1.0.0-beta.5 + twoslash-vue: 0.1.0(typescript@5.3.3) + vue: 3.4.15(typescript@5.3.3) + transitivePeerDependencies: + - '@nuxt/kit' + - supports-color + - typescript + dev: true + /@sindresorhus/merge-streams@1.0.0: resolution: {integrity: sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==} engines: {node: '>=18'} @@ -1435,6 +1478,12 @@ packages: - typescript dev: true + /@types/debug@4.1.12: + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + dependencies: + '@types/ms': 0.7.34 + dev: true + /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} dev: true @@ -1446,6 +1495,12 @@ packages: '@types/node': 18.19.14 dev: true + /@types/hast@3.0.4: + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + dependencies: + '@types/unist': 2.0.10 + dev: true + /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true @@ -1473,10 +1528,20 @@ packages: '@types/unist': 2.0.10 dev: true + /@types/mdast@4.0.3: + resolution: {integrity: sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==} + dependencies: + '@types/unist': 3.0.2 + dev: true + /@types/mdurl@1.0.5: resolution: {integrity: sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==} dev: true + /@types/ms@0.7.34: + resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} + dev: true + /@types/node@18.19.14: resolution: {integrity: sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==} dependencies: @@ -1495,6 +1560,10 @@ packages: resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} dev: true + /@types/unist@3.0.2: + resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==} + dev: true + /@types/web-bluetooth@0.0.14: resolution: {integrity: sha512-5d2RhCard1nQUC3aHcq/gHzWYO6K0WJmAbjO7mQJgCQKtZpgXxv1rOM6O/dBDhDYYVutk1sciOgNSe+5YyfM8A==} dev: true @@ -1634,6 +1703,14 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript/vfs@1.5.0: + resolution: {integrity: sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg==} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true @@ -1997,6 +2074,18 @@ packages: vue: 3.4.15(typescript@5.3.3) dev: true + /@volar/language-core@1.11.1: + resolution: {integrity: sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==} + dependencies: + '@volar/source-map': 1.11.1 + dev: true + + /@volar/source-map@1.11.1: + resolution: {integrity: sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==} + dependencies: + muggle-string: 0.3.1 + dev: true + /@vue/compiler-core@3.4.15: resolution: {integrity: sha512-XcJQVOaxTKCnth1vCxEChteGuwG6wqnUHxAm1DO3gCz0+uXKaJNx8/digSz4dLALCy8n2lKq24jSUs8segoqIw==} dependencies: @@ -2062,6 +2151,26 @@ packages: rfdc: 1.3.1 dev: true + /@vue/language-core@1.8.27(typescript@5.3.3): + resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@volar/language-core': 1.11.1 + '@volar/source-map': 1.11.1 + '@vue/compiler-dom': 3.4.15 + '@vue/shared': 3.4.15 + computeds: 0.0.1 + minimatch: 9.0.3 + muggle-string: 0.3.1 + path-browserify: 1.0.1 + typescript: 5.3.3 + vue-template-compiler: 2.7.16 + dev: true + /@vue/reactivity@3.4.15: resolution: {integrity: sha512-55yJh2bsff20K5O84MxSvXKPHHt17I2EomHznvFiJCAZpJTNW8IuLj1xZWMLELRhBK3kkFV/1ErZGHJfah7i7w==} dependencies: @@ -2458,6 +2567,10 @@ packages: resolution: {integrity: sha512-acWTYaha8xfhA/Du/z4sNZjHUWjkiuoAi2LM+T/aL+kemKQgPT1xBb/YKjlQ0Qo8gvbHsGNplrEJ+9G3gL7i4Q==} dev: true + /ccount@2.0.1: + resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + dev: true + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -2483,6 +2596,10 @@ packages: resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} dev: true + /character-entities@2.0.2: + resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + dev: true + /character-reference-invalid@1.1.4: resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} dev: true @@ -2586,6 +2703,10 @@ packages: engines: {node: '>= 12.0.0'} dev: true + /computeds@0.0.1: + resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==} + dev: true + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true @@ -2932,6 +3053,10 @@ packages: resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==} dev: true + /de-indent@1.0.2: + resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} + dev: true + /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -2955,6 +3080,12 @@ packages: ms: 2.1.2 dev: true + /decode-named-character-reference@1.0.2: + resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} + dependencies: + character-entities: 2.0.2 + dev: true + /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true @@ -2987,6 +3118,11 @@ packages: robust-predicates: 3.0.1 dev: true + /dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + dev: true + /destr@1.2.2: resolution: {integrity: sha512-lrbCJwD9saUQrqUfXvl6qoM+QN3W7tLV5pAOs+OqOmopCCz/JkE05MHedJR1xfk4IAnZuJXPVuN5+7jNA2ZCiA==} dev: true @@ -2995,6 +3131,12 @@ packages: resolution: {integrity: sha512-65AlobnZMiCET00KaFFjUefxDX0khFA/E4myqZ7a6Sq1yZtR8+FVIvilVX66vF2uobSumxooYZChiRPCKNqhmg==} dev: true + /devlop@1.1.0: + resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + dependencies: + dequal: 2.0.3 + dev: true + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -3317,7 +3459,6 @@ packages: engines: {node: '>=12'} requiresBuild: true dev: true - optional: true /eslint-compat-utils@0.1.2(eslint@8.56.0): resolution: {integrity: sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==} @@ -3889,6 +4030,20 @@ packages: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true + /floating-vue@5.2.2(vue@3.4.15): + resolution: {integrity: sha512-afW+h2CFafo+7Y9Lvw/xsqjaQlKLdJV7h1fCHfcYQ1C4SVMlu7OAekqWgu5d4SgvkBVU0pVpLlVsrSTBURFRkg==} + peerDependencies: + '@nuxt/kit': ^3.2.0 + vue: ^3.2.0 + peerDependenciesMeta: + '@nuxt/kit': + optional: true + dependencies: + '@floating-ui/dom': 1.1.1 + vue: 3.4.15(typescript@5.3.3) + vue-resize: 2.0.0-alpha.1(vue@3.4.15) + dev: true + /focus-trap@7.5.4: resolution: {integrity: sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==} dependencies: @@ -4078,6 +4233,11 @@ packages: function-bind: 1.1.2 dev: true + /he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + dev: true + /heap@0.2.7: resolution: {integrity: sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==} dev: true @@ -4332,6 +4492,7 @@ packages: /jsonc-parser@3.2.1: resolution: {integrity: sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==} + requiresBuild: true dev: true /jsonfile@6.1.0: @@ -4439,6 +4600,10 @@ packages: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: true + /longest-streak@3.1.0: + resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} + dev: true + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -4482,6 +4647,19 @@ packages: uc.micro: 2.0.0 dev: true + /markdown-table@3.0.3: + resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==} + dev: true + + /mdast-util-find-and-replace@3.0.1: + resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==} + dependencies: + '@types/mdast': 4.0.3 + escape-string-regexp: 5.0.0 + unist-util-is: 6.0.0 + unist-util-visit-parents: 6.0.1 + dev: true + /mdast-util-from-markdown@0.8.5: resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} dependencies: @@ -4494,10 +4672,138 @@ packages: - supports-color dev: true + /mdast-util-from-markdown@2.0.0: + resolution: {integrity: sha512-n7MTOr/z+8NAX/wmhhDji8O3bRvPTV/U0oTCaZJkjhPSKTPhS3xufVhKGF8s1pJ7Ox4QgoIU7KHseh09S+9rTA==} + dependencies: + '@types/mdast': 4.0.3 + '@types/unist': 3.0.2 + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + mdast-util-to-string: 4.0.0 + micromark: 4.0.0 + micromark-util-decode-numeric-character-reference: 2.0.1 + micromark-util-decode-string: 2.0.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + unist-util-stringify-position: 4.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm-autolink-literal@2.0.0: + resolution: {integrity: sha512-FyzMsduZZHSc3i0Px3PQcBT4WJY/X/RCtEJKuybiC6sjPqLv7h1yqAkmILZtuxMSsUyaLUWNp71+vQH2zqp5cg==} + dependencies: + '@types/mdast': 4.0.3 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-find-and-replace: 3.0.1 + micromark-util-character: 2.1.0 + dev: true + + /mdast-util-gfm-footnote@2.0.0: + resolution: {integrity: sha512-5jOT2boTSVkMnQ7LTrd6n/18kqwjmuYqo7JUPe+tRCY6O7dAuTFMtTPauYYrMPpox9hlN0uOx/FL8XvEfG9/mQ==} + dependencies: + '@types/mdast': 4.0.3 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + micromark-util-normalize-identifier: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm-strikethrough@2.0.0: + resolution: {integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==} + dependencies: + '@types/mdast': 4.0.3 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm-table@2.0.0: + resolution: {integrity: sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==} + dependencies: + '@types/mdast': 4.0.3 + devlop: 1.1.0 + markdown-table: 3.0.3 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm-task-list-item@2.0.0: + resolution: {integrity: sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==} + dependencies: + '@types/mdast': 4.0.3 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-gfm@3.0.0: + resolution: {integrity: sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==} + dependencies: + mdast-util-from-markdown: 2.0.0 + mdast-util-gfm-autolink-literal: 2.0.0 + mdast-util-gfm-footnote: 2.0.0 + mdast-util-gfm-strikethrough: 2.0.0 + mdast-util-gfm-table: 2.0.0 + mdast-util-gfm-task-list-item: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-phrasing@4.1.0: + resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} + dependencies: + '@types/mdast': 4.0.3 + unist-util-is: 6.0.0 + dev: true + + /mdast-util-to-hast@13.1.0: + resolution: {integrity: sha512-/e2l/6+OdGp/FB+ctrJ9Avz71AN/GRH3oi/3KAx/kMnoUsD6q0woXlDT8lLEeViVKE7oZxE7RXzvO3T8kF2/sA==} + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.3 + '@ungap/structured-clone': 1.2.0 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.0 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.0.0 + vfile: 6.0.1 + dev: true + + /mdast-util-to-markdown@2.1.0: + resolution: {integrity: sha512-SR2VnIEdVNCJbP6y7kVTJgPLifdr8WEU440fQec7qHoHOUz/oJ2jmNRqdDQ3rbiStOXb2mCDGTuwsK5OPUgYlQ==} + dependencies: + '@types/mdast': 4.0.3 + '@types/unist': 3.0.2 + longest-streak: 3.1.0 + mdast-util-phrasing: 4.1.0 + mdast-util-to-string: 4.0.0 + micromark-util-decode-string: 2.0.0 + unist-util-visit: 5.0.0 + zwitch: 2.0.4 + dev: true + /mdast-util-to-string@2.0.0: resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} dev: true + /mdast-util-to-string@4.0.0: + resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + dependencies: + '@types/mdast': 4.0.3 + dev: true + /mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} dev: true @@ -4536,6 +4842,157 @@ packages: web-worker: 1.3.0 dev: true + /micromark-core-commonmark@2.0.0: + resolution: {integrity: sha512-jThOz/pVmAYUtkroV3D5c1osFXAMv9e0ypGDOIZuCeAe91/sD6BoE2Sjzt30yuXtwOYUmySOhMas/PVyh02itA==} + dependencies: + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + micromark-factory-destination: 2.0.0 + micromark-factory-label: 2.0.0 + micromark-factory-space: 2.0.0 + micromark-factory-title: 2.0.0 + micromark-factory-whitespace: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-classify-character: 2.0.0 + micromark-util-html-tag-name: 2.0.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-resolve-all: 2.0.0 + micromark-util-subtokenize: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-destination@2.0.0: + resolution: {integrity: sha512-j9DGrQLm/Uhl2tCzcbLhy5kXsgkHUrjJHg4fFAeoMRwJmJerT9aw4FEhIbZStWN8A3qMwOp1uzHr4UL8AInxtA==} + dependencies: + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-label@2.0.0: + resolution: {integrity: sha512-RR3i96ohZGde//4WSe/dJsxOX6vxIg9TimLAS3i4EhBAFx8Sm5SmqVfR8E87DPSR31nEAjZfbt91OMZWcNgdZw==} + dependencies: + devlop: 1.1.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-space@2.0.0: + resolution: {integrity: sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==} + dependencies: + micromark-util-character: 2.1.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-title@2.0.0: + resolution: {integrity: sha512-jY8CSxmpWLOxS+t8W+FG3Xigc0RDQA9bKMY/EwILvsesiRniiVMejYTE4wumNc2f4UbAa4WsHqe3J1QS1sli+A==} + dependencies: + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-factory-whitespace@2.0.0: + resolution: {integrity: sha512-28kbwaBjc5yAI1XadbdPYHX/eDnqaUFVikLwrO7FDnKG7lpgxnvk/XGRhX/PN0mOZ+dBSZ+LgunHS+6tYQAzhA==} + dependencies: + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-character@2.1.0: + resolution: {integrity: sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==} + dependencies: + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-chunked@2.0.0: + resolution: {integrity: sha512-anK8SWmNphkXdaKgz5hJvGa7l00qmcaUQoMYsBwDlSKFKjc6gjGXPDw3FNL3Nbwq5L8gE+RCbGqTw49FK5Qyvg==} + dependencies: + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-classify-character@2.0.0: + resolution: {integrity: sha512-S0ze2R9GH+fu41FA7pbSqNWObo/kzwf8rN/+IGlW/4tC6oACOs8B++bh+i9bVyNnwCcuksbFwsBme5OCKXCwIw==} + dependencies: + micromark-util-character: 2.1.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-combine-extensions@2.0.0: + resolution: {integrity: sha512-vZZio48k7ON0fVS3CUgFatWHoKbbLTK/rT7pzpJ4Bjp5JjkZeasRfrS9wsBdDJK2cJLHMckXZdzPSSr1B8a4oQ==} + dependencies: + micromark-util-chunked: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-decode-numeric-character-reference@2.0.1: + resolution: {integrity: sha512-bmkNc7z8Wn6kgjZmVHOX3SowGmVdhYS7yBpMnuMnPzDq/6xwVA604DuOXMZTO1lvq01g+Adfa0pE2UKGlxL1XQ==} + dependencies: + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-decode-string@2.0.0: + resolution: {integrity: sha512-r4Sc6leeUTn3P6gk20aFMj2ntPwn6qpDZqWvYmAG6NgvFTIlj4WtrAudLi65qYoaGdXYViXYw2pkmn7QnIFasA==} + dependencies: + decode-named-character-reference: 1.0.2 + micromark-util-character: 2.1.0 + micromark-util-decode-numeric-character-reference: 2.0.1 + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-encode@2.0.0: + resolution: {integrity: sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==} + dev: true + + /micromark-util-html-tag-name@2.0.0: + resolution: {integrity: sha512-xNn4Pqkj2puRhKdKTm8t1YHC/BAjx6CEwRFXntTaRf/x16aqka6ouVoutm+QdkISTlT7e2zU7U4ZdlDLJd2Mcw==} + dev: true + + /micromark-util-normalize-identifier@2.0.0: + resolution: {integrity: sha512-2xhYT0sfo85FMrUPtHcPo2rrp1lwbDEEzpx7jiH2xXJLqBuy4H0GgXk5ToU8IEwoROtXuL8ND0ttVa4rNqYK3w==} + dependencies: + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-resolve-all@2.0.0: + resolution: {integrity: sha512-6KU6qO7DZ7GJkaCgwBNtplXCvGkJToU86ybBAUdavvgsCiG8lSSvYxr9MhwmQ+udpzywHsl4RpGJsYWG1pDOcA==} + dependencies: + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-sanitize-uri@2.0.0: + resolution: {integrity: sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==} + dependencies: + micromark-util-character: 2.1.0 + micromark-util-encode: 2.0.0 + micromark-util-symbol: 2.0.0 + dev: true + + /micromark-util-subtokenize@2.0.0: + resolution: {integrity: sha512-vc93L1t+gpR3p8jxeVdaYlbV2jTYteDje19rNSS/H5dlhxUYll5Fy6vJ2cDwP8RnsXi818yGty1ayP55y3W6fg==} + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: true + + /micromark-util-symbol@2.0.0: + resolution: {integrity: sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==} + dev: true + + /micromark-util-types@2.0.0: + resolution: {integrity: sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==} + dev: true + /micromark@2.11.4: resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} dependencies: @@ -4545,6 +5002,30 @@ packages: - supports-color dev: true + /micromark@4.0.0: + resolution: {integrity: sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==} + dependencies: + '@types/debug': 4.1.12 + debug: 4.3.4 + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.0 + micromark-factory-space: 2.0.0 + micromark-util-character: 2.1.0 + micromark-util-chunked: 2.0.0 + micromark-util-combine-extensions: 2.0.0 + micromark-util-decode-numeric-character-reference: 2.0.1 + micromark-util-encode: 2.0.0 + micromark-util-normalize-identifier: 2.0.0 + micromark-util-resolve-all: 2.0.0 + micromark-util-sanitize-uri: 2.0.0 + micromark-util-subtokenize: 2.0.0 + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: true + /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -4652,6 +5133,10 @@ packages: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true + /muggle-string@0.3.1: + resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==} + dev: true + /nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -4866,6 +5351,10 @@ packages: lines-and-columns: 1.2.4 dev: true + /path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + dev: true + /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -5419,6 +5908,10 @@ packages: engines: {node: '>=6'} dev: true + /trim-lines@3.0.1: + resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + dev: true + /ts-api-utils@1.0.3(typescript@5.3.3): resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} engines: {node: '>=16.13.0'} @@ -5437,6 +5930,29 @@ packages: resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} dev: true + /twoslash-vue@0.1.0(typescript@5.3.3): + resolution: {integrity: sha512-4IVOdvQcjLY5KTrsR9GuTUAThhpYQqkkKawCtfUaTSkui3CXR2KPYBJMvY5yM1by+TkENBlW1ykLywP2BGukHg==} + peerDependencies: + typescript: '*' + dependencies: + '@vue/language-core': 1.8.27(typescript@5.3.3) + twoslash: 0.1.0(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /twoslash@0.1.0(typescript@5.3.3): + resolution: {integrity: sha512-zvDn23/FwNdi/i2xMTTDcn7xnX4iKlp6tJt68aD86zRqesQrb/HOnMBtaUu6+vme4gtlX9ScEfKYog1+7IPKSw==} + peerDependencies: + typescript: '*' + dependencies: + '@typescript/vfs': 1.5.0 + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -5541,12 +6057,45 @@ packages: dev: true optional: true + /unist-util-is@6.0.0: + resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} + dependencies: + '@types/unist': 3.0.2 + dev: true + + /unist-util-position@5.0.0: + resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} + dependencies: + '@types/unist': 3.0.2 + dev: true + /unist-util-stringify-position@2.0.3: resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} dependencies: '@types/unist': 2.0.10 dev: true + /unist-util-stringify-position@4.0.0: + resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + dependencies: + '@types/unist': 3.0.2 + dev: true + + /unist-util-visit-parents@6.0.1: + resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==} + dependencies: + '@types/unist': 3.0.2 + unist-util-is: 6.0.0 + dev: true + + /unist-util-visit@5.0.0: + resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} + dependencies: + '@types/unist': 3.0.2 + unist-util-is: 6.0.0 + unist-util-visit-parents: 6.0.1 + dev: true + /universalify@2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} @@ -5740,6 +6289,21 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /vfile-message@4.0.2: + resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} + dependencies: + '@types/unist': 3.0.2 + unist-util-stringify-position: 4.0.0 + dev: true + + /vfile@6.0.1: + resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==} + dependencies: + '@types/unist': 3.0.2 + unist-util-stringify-position: 4.0.0 + vfile-message: 4.0.2 + dev: true + /vite-plugin-inspect@0.8.3(vite@3.2.8): resolution: {integrity: sha512-SBVzOIdP/kwe6hjkt7LSW4D0+REqqe58AumcnCfRNw4Kt3mbS9pEBkch+nupu2PBxv2tQi69EQHQ1ZA1vgB/Og==} engines: {node: '>=14'} @@ -5937,6 +6501,14 @@ packages: - supports-color dev: true + /vue-resize@2.0.0-alpha.1(vue@3.4.15): + resolution: {integrity: sha512-7+iqOueLU7uc9NrMfrzbG8hwMqchfVfSzpVlCMeJQe4pyibqyoifDNbKTZvwxZKDvGkB+PdFeKvnGZMoEb8esg==} + peerDependencies: + vue: ^3.0.0 + dependencies: + vue: 3.4.15(typescript@5.3.3) + dev: true + /vue-router@4.2.5(vue@3.4.15): resolution: {integrity: sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==} peerDependencies: @@ -5956,6 +6528,13 @@ packages: - typescript dev: true + /vue-template-compiler@2.7.16: + resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} + dependencies: + de-indent: 1.0.2 + he: 1.2.0 + dev: true + /vue@3.4.15(typescript@5.3.3): resolution: {integrity: sha512-jC0GH4KkWLWJOEQjOpkqU1bQsBwf4R1rsFtw5GQJbjHVKWDzO6P0nWWBTmjp1xSemAioDFj1jdaK1qa3DnMQoQ==} peerDependencies: @@ -6066,3 +6645,7 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true + + /zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + dev: true diff --git a/resources/learning.md b/resources/learning.md index cfa4cab..614872d 100644 --- a/resources/learning.md +++ b/resources/learning.md @@ -4,7 +4,7 @@ ### Videos - + ### Articles diff --git a/themes/write-a-theme.md b/themes/write-a-theme.md index 08ee0fe..5e79af9 100644 --- a/themes/write-a-theme.md +++ b/themes/write-a-theme.md @@ -118,7 +118,7 @@ Slidev toggles a `dark` class on the page's `html` element for switching color s ### Highlighter -Syntax highlighting colors are also provided in the theme. We support both [Prism](https://prismjs.com/), [Shiki](https://github.com/shikijs/shiki) and [Shikiji](https://github.com/antfu/shikiji). For more information please refer to [the syntax highlighting docs](/custom/highlighters). +Syntax highlighting colors are also provided in the theme. We support both [Prism](https://prismjs.com/), [Shiki](https://github.com/shikijs/shiki). For more information please refer to [the syntax highlighting docs](/custom/highlighters). You can support either one of them, or both. Refer to the default theme for configurations examples [`./styles/code.css`](https://github.com/slidevjs/slidev/blob/main/packages/create-theme/template/styles/code.css) / [`./setup/shiki.ts`](https://github.com/slidevjs/slidev/blob/main/packages/create-theme/template/setup/shiki.ts). From 6733ad9849abeb71c82213da07b3fc1e1b995b73 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 2 Feb 2024 21:32:06 +0100 Subject: [PATCH 121/134] chore: update --- components.d.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/components.d.ts b/components.d.ts index 0b36d01..10dffc6 100644 --- a/components.d.ts +++ b/components.d.ts @@ -12,9 +12,6 @@ declare module 'vue' { ArrowRight: typeof import('./.vitepress/theme/components/icons/ArrowRight.vue')['default'] AutoFitText: typeof import('./.vitepress/@slidev/client/builtin/AutoFitText.vue')['default'] BooleanDisplay: typeof import('./.vitepress/theme/components/BooleanDisplay.vue')['default'] - 'Carbon:chevronLeft': typeof import('~icons/carbon/chevron-left')['default'] - 'Carbon:chevronRight': typeof import('~icons/carbon/chevron-right')['default'] - 'Carbon:logoTwitter': typeof import('~icons/carbon/logo-twitter')['default'] CarbonApps: typeof import('~icons/carbon/apps')['default'] CarbonArrowLeft: typeof import('~icons/carbon/arrow-left')['default'] CarbonArrowRight: typeof import('~icons/carbon/arrow-right')['default'] @@ -38,7 +35,6 @@ declare module 'vue' { DemoEditor: typeof import('./.vitepress/theme/components/demo/DemoEditor.vue')['default'] DemoSlide: typeof import('./.vitepress/theme/components/demo/DemoSlide.vue')['default'] Environment: typeof import('./.vitepress/theme/components/Environment.vue')['default'] - HomeFeatures: typeof import('./.vitepress/theme/components/HomeFeatures.vue')['default'] Link: typeof import('./.vitepress/@slidev/client/builtin/Link.vue')['default'] LogosVue: typeof import('~icons/logos/vue')['default'] MdiAccountCircle: typeof import('~icons/mdi/account-circle')['default'] @@ -53,8 +49,6 @@ declare module 'vue' { RouterView: typeof import('vue-router')['RouterView'] ShowCaseInfo: typeof import('./.vitepress/theme/components/ShowCaseInfo.vue')['default'] ShowCases: typeof import('./.vitepress/theme/components/ShowCases.vue')['default'] - SimpleIconsGithub: typeof import('~icons/simple-icons/github')['default'] - SimpleIconsNpm: typeof import('~icons/simple-icons/npm')['default'] SlideCurrentNo: typeof import('./.vitepress/@slidev/client/builtin/SlideCurrentNo.vue')['default'] SlidesTotal: typeof import('./.vitepress/@slidev/client/builtin/SlidesTotal.vue')['default'] Starport: typeof import('vue-starport')['Starport'] From 0a3ecb18a203289747bc5c18fb332402a4a8e393 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 2 Feb 2024 21:40:28 +0100 Subject: [PATCH 122/134] chore: update --- .vitepress/theme/components/demo/DemoEditor.vue | 12 +++++++----- .vitepress/theme/styles/vars.css | 1 + components.d.ts | 2 ++ netlify.toml | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.vitepress/theme/components/demo/DemoEditor.vue b/.vitepress/theme/components/demo/DemoEditor.vue index 0d685f6..51e8aee 100644 --- a/.vitepress/theme/components/demo/DemoEditor.vue +++ b/.vitepress/theme/components/demo/DemoEditor.vue @@ -1,11 +1,11 @@ - From 36a1b5a39b047328e5666ec04c57c77e21277408 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 2 Feb 2024 22:36:53 +0100 Subject: [PATCH 124/134] chore: fix netlify --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 6174c77..56736cf 100755 --- a/netlify.toml +++ b/netlify.toml @@ -3,7 +3,7 @@ publish = ".vitepress/dist" command = "pnpm run build" [build.environment] -NODE_VERSION = 20 +NODE_VERSION = "20" PLAYWRIGHT_BROWSERS_PATH = "0" [[redirects]] From b41368d064b797a78bad162df3a02793b4b8e8ef Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 2 Feb 2024 22:56:25 +0100 Subject: [PATCH 125/134] chore: update --- .vitepress/theme/components/{demo => }/Demo.vue | 0 .vitepress/theme/components/{demo => }/DemoEditor.vue | 0 .vitepress/theme/components/{demo => }/DemoSlide.vue | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename .vitepress/theme/components/{demo => }/Demo.vue (100%) rename .vitepress/theme/components/{demo => }/DemoEditor.vue (100%) rename .vitepress/theme/components/{demo => }/DemoSlide.vue (100%) diff --git a/.vitepress/theme/components/demo/Demo.vue b/.vitepress/theme/components/Demo.vue similarity index 100% rename from .vitepress/theme/components/demo/Demo.vue rename to .vitepress/theme/components/Demo.vue diff --git a/.vitepress/theme/components/demo/DemoEditor.vue b/.vitepress/theme/components/DemoEditor.vue similarity index 100% rename from .vitepress/theme/components/demo/DemoEditor.vue rename to .vitepress/theme/components/DemoEditor.vue diff --git a/.vitepress/theme/components/demo/DemoSlide.vue b/.vitepress/theme/components/DemoSlide.vue similarity index 100% rename from .vitepress/theme/components/demo/DemoSlide.vue rename to .vitepress/theme/components/DemoSlide.vue From 79a4d453cf7d626368487ec247f6becebd0a20d5 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 2 Feb 2024 23:11:01 +0100 Subject: [PATCH 126/134] chore: fix demo style --- .vitepress/config.ts | 1 + .vitepress/theme/Layout.vue | 138 ------------------ .vitepress/theme/NotFound.vue | 23 --- .../theme/components/BooleanDisplay.vue | 25 ---- .../theme/components/DarkModeSwitch.vue | 13 -- .vitepress/theme/components/Demo.vue | 3 + .vitepress/theme/components/DemoContainer.vue | 18 --- .vitepress/theme/components/LandingPage.vue | 24 +++ .../components/{Tweet.vue => TheTweet.vue} | 2 +- .../theme/components/ToggleSideBarButton.vue | 46 ------ .../theme/components/icons/ArrowLeft.vue | 5 - .../theme/components/icons/ArrowRight.vue | 5 - .vitepress/theme/components/icons/Moon.vue | 8 - .../theme/components/icons/OutboundLink.vue | 31 ---- .vitepress/theme/components/icons/README.md | 1 - .vitepress/theme/components/icons/Sun.vue | 28 ---- .vitepress/theme/config.ts | 128 ---------------- .vitepress/theme/support/sideBar.ts | 67 --------- .vitepress/theme/utils.ts | 77 ---------- components.d.ts | 20 +-- guide/drawing.md | 2 +- guide/editors.md | 2 +- guide/recording.md | 2 +- guide/syntax.md | 2 +- index.md | 34 +---- 25 files changed, 40 insertions(+), 665 deletions(-) delete mode 100644 .vitepress/theme/Layout.vue delete mode 100644 .vitepress/theme/NotFound.vue delete mode 100644 .vitepress/theme/components/BooleanDisplay.vue delete mode 100644 .vitepress/theme/components/DarkModeSwitch.vue delete mode 100644 .vitepress/theme/components/DemoContainer.vue create mode 100644 .vitepress/theme/components/LandingPage.vue rename .vitepress/theme/components/{Tweet.vue => TheTweet.vue} (98%) delete mode 100644 .vitepress/theme/components/ToggleSideBarButton.vue delete mode 100644 .vitepress/theme/components/icons/ArrowLeft.vue delete mode 100644 .vitepress/theme/components/icons/ArrowRight.vue delete mode 100644 .vitepress/theme/components/icons/Moon.vue delete mode 100644 .vitepress/theme/components/icons/OutboundLink.vue delete mode 100644 .vitepress/theme/components/icons/README.md delete mode 100644 .vitepress/theme/components/icons/Sun.vue delete mode 100644 .vitepress/theme/config.ts delete mode 100644 .vitepress/theme/support/sideBar.ts delete mode 100644 .vitepress/theme/utils.ts diff --git a/.vitepress/config.ts b/.vitepress/config.ts index feffd36..8c5d9e1 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -1,6 +1,7 @@ import type { DefaultTheme } from 'vitepress' import { defineConfig } from 'vitepress' import { transformerTwoslash } from '@shikijs/vitepress-twoslash' +import vite from '../vite.config' const CURRENT_VERSION = '0.47.1' diff --git a/.vitepress/theme/Layout.vue b/.vitepress/theme/Layout.vue deleted file mode 100644 index 098f608..0000000 --- a/.vitepress/theme/Layout.vue +++ /dev/null @@ -1,138 +0,0 @@ - - - diff --git a/.vitepress/theme/NotFound.vue b/.vitepress/theme/NotFound.vue deleted file mode 100644 index bfaacb6..0000000 --- a/.vitepress/theme/NotFound.vue +++ /dev/null @@ -1,23 +0,0 @@ - - - diff --git a/.vitepress/theme/components/BooleanDisplay.vue b/.vitepress/theme/components/BooleanDisplay.vue deleted file mode 100644 index d51afbc..0000000 --- a/.vitepress/theme/components/BooleanDisplay.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - diff --git a/.vitepress/theme/components/DarkModeSwitch.vue b/.vitepress/theme/components/DarkModeSwitch.vue deleted file mode 100644 index 3e1c70b..0000000 --- a/.vitepress/theme/components/DarkModeSwitch.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - diff --git a/.vitepress/theme/components/Demo.vue b/.vitepress/theme/components/Demo.vue index 1d1d41c..0c3d0eb 100644 --- a/.vitepress/theme/components/Demo.vue +++ b/.vitepress/theme/components/Demo.vue @@ -15,6 +15,9 @@ import SlideContainer from '@slidev/client/internals/SlideContainer.vue' import '@slidev/client/styles/layouts-base.css' import '@slidev/theme-default/styles/layouts.css' +import DemoEditor from './DemoEditor.vue' +import DemoSlide from './DemoSlide.vue' + const page = ref(0) const paused = ref(false) const code = ref('') diff --git a/.vitepress/theme/components/DemoContainer.vue b/.vitepress/theme/components/DemoContainer.vue deleted file mode 100644 index 1ea93e1..0000000 --- a/.vitepress/theme/components/DemoContainer.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/.vitepress/theme/components/LandingPage.vue b/.vitepress/theme/components/LandingPage.vue new file mode 100644 index 0000000..1a60abf --- /dev/null +++ b/.vitepress/theme/components/LandingPage.vue @@ -0,0 +1,24 @@ + diff --git a/.vitepress/theme/components/Tweet.vue b/.vitepress/theme/components/TheTweet.vue similarity index 98% rename from .vitepress/theme/components/Tweet.vue rename to .vitepress/theme/components/TheTweet.vue index af64870..9bf610e 100644 --- a/.vitepress/theme/components/Tweet.vue +++ b/.vitepress/theme/components/TheTweet.vue @@ -3,7 +3,7 @@ A simple wrapper for embedded Tweet Usage: - + --> - - - - diff --git a/.vitepress/theme/components/icons/ArrowLeft.vue b/.vitepress/theme/components/icons/ArrowLeft.vue deleted file mode 100644 index 3f64f1a..0000000 --- a/.vitepress/theme/components/icons/ArrowLeft.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/.vitepress/theme/components/icons/ArrowRight.vue b/.vitepress/theme/components/icons/ArrowRight.vue deleted file mode 100644 index 19d2186..0000000 --- a/.vitepress/theme/components/icons/ArrowRight.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/.vitepress/theme/components/icons/Moon.vue b/.vitepress/theme/components/icons/Moon.vue deleted file mode 100644 index 69567db..0000000 --- a/.vitepress/theme/components/icons/Moon.vue +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/.vitepress/theme/components/icons/OutboundLink.vue b/.vitepress/theme/components/icons/OutboundLink.vue deleted file mode 100644 index 4d74eee..0000000 --- a/.vitepress/theme/components/icons/OutboundLink.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - diff --git a/.vitepress/theme/components/icons/README.md b/.vitepress/theme/components/icons/README.md deleted file mode 100644 index 58b1801..0000000 --- a/.vitepress/theme/components/icons/README.md +++ /dev/null @@ -1 +0,0 @@ -Download from https://icones.js.org/collection/carbon diff --git a/.vitepress/theme/components/icons/Sun.vue b/.vitepress/theme/components/icons/Sun.vue deleted file mode 100644 index 9cd6bdf..0000000 --- a/.vitepress/theme/components/icons/Sun.vue +++ /dev/null @@ -1,28 +0,0 @@ - diff --git a/.vitepress/theme/config.ts b/.vitepress/theme/config.ts deleted file mode 100644 index 3139fb5..0000000 --- a/.vitepress/theme/config.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* eslint-disable @typescript-eslint/no-namespace */ - -export namespace DefaultTheme { - export interface Config { - logo?: string - nav?: NavItem[] | false - sidebar?: SideBarConfig | MultiSideBarConfig - - /** - * GitHub repository following the format /. - * - * @example `"vuejs/vue-next"` - */ - repo?: string - - /** - * Customize the header label. Defaults to GitHub/Gitlab/Bitbucket - * depending on the provided repo. - * - * @exampe `"Contribute!"` - */ - repoLabel?: string - - /** - * If your docs are in a different repository from your main project. - * - * @example `"vuejs/docs-next"` - */ - docsRepo?: string - - /** - * If your docs are not at the root of the repo. - * - * @example `"docs"` - */ - docsDir?: string - - /** - * If your docs are in a different branch. Defaults to `main`. - * - * @example `"next"` - */ - docsBranch?: string - - /** - * Enable links to edit pages at the bottom of the page. - */ - editLinks?: boolean - - /** - * Custom text for edit link. Defaults to "Edit this page". - */ - editLinkText?: string - - /** - * Show last updated time at the bottom of the page. Defaults to `false`. - * If given a string, it will be displayed as a prefix (default value: - * "Last Updated"). - */ - lastUpdated?: string | boolean - - prevLinks?: boolean - nextLinks?: boolean - - locales?: Record> - } - - // navbar -------------------------------------------------------------------- - - export type NavItem = NavItemWithLink | NavItemWithChildren - - export interface NavItemBase { - text: string - target?: string - rel?: string - ariaLabel?: string - activeMatch?: string - } - - export interface NavItemWithLink extends NavItemBase { - link: string - } - - export interface NavItemWithChildren extends NavItemBase { - items: NavItemWithLink[] - } - - // sidebar ------------------------------------------------------------------- - - export type SideBarConfig = SideBarItem[] | 'auto' | false - - export interface MultiSideBarConfig { - [path: string]: SideBarConfig - } - - export type SideBarItem = SideBarLink | SideBarGroup - - export interface SideBarLink { - text: string - link: string - } - - export interface SideBarGroup { - text: string - link?: string - - /** - * @default false - */ - collapsable?: boolean - - children: SideBarItem[] - } - - // locales ------------------------------------------------------------------- - - export interface LocaleConfig { - /** - * Text for the language dropdown. - */ - selectText?: string - - /** - * Label for this locale in the language dropdown. - */ - label?: string - } -} diff --git a/.vitepress/theme/support/sideBar.ts b/.vitepress/theme/support/sideBar.ts deleted file mode 100644 index ccd068f..0000000 --- a/.vitepress/theme/support/sideBar.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { DefaultTheme } from '../config' -import { - ensureSlash, - ensureStartingSlash, - isArray, - removeExtension, -} from '../utils' - -export function isSideBarConfig( - sidebar: DefaultTheme.SideBarConfig | DefaultTheme.MultiSideBarConfig, -): sidebar is DefaultTheme.SideBarConfig { - return sidebar === false || sidebar === 'auto' || isArray(sidebar) -} - -export function isSideBarGroup( - item: DefaultTheme.SideBarItem, -): item is DefaultTheme.SideBarGroup { - return (item as DefaultTheme.SideBarGroup).children !== undefined -} - -/** - * Get the `SideBarConfig` from sidebar option. This method will ensure to get - * correct sidebar config from `MultiSideBarConfig` with various path - * combinations such as matching `guide/` and `/guide/`. If no matching config - * was found, it will return `auto` as a fallback. - */ -export function getSideBarConfig( - sidebar: DefaultTheme.SideBarConfig | DefaultTheme.MultiSideBarConfig, - path: string, -): DefaultTheme.SideBarConfig { - if (isSideBarConfig(sidebar)) - return sidebar - - // get the very first segment of the path to compare with nulti sidebar keys - // and make sure it's surrounded by slash - path = removeExtension(path) - path = ensureStartingSlash(path).split('/')[1] || '/' - path = ensureSlash(path) - - for (const dir of Object.keys(sidebar)) { - // make sure the multi sidebar key is surrounded by slash too - if (path === ensureSlash(dir)) - return sidebar[dir] - } - - return 'auto' -} - -/** - * Get flat sidebar links from the sidebar items. This method is useful for - * creating the "next and prev link" feature. It will ignore any items that - * don't have `link` property and removes `.md` or `.html` extension if a - * link contains it. - */ -export function getFlatSideBarLinks( - sidebar: DefaultTheme.SideBarItem[], -): DefaultTheme.SideBarLink[] { - return sidebar.reduce((links, item) => { - if (item.link) - links.push({ text: item.text, link: removeExtension(item.link) }) - - if (isSideBarGroup(item)) - links = [...links, ...getFlatSideBarLinks(item.children)] - - return links - }, []) -} diff --git a/.vitepress/theme/utils.ts b/.vitepress/theme/utils.ts deleted file mode 100644 index 6e985af..0000000 --- a/.vitepress/theme/utils.ts +++ /dev/null @@ -1,77 +0,0 @@ -export const hashRE = /#.*$/ -export const extRE = /(index)?\.(md|html)$/ -export const endingSlashRE = /\/$/ -export const outboundRE = /^[a-z]+:/i - -export function isNullish(value: any): value is null | undefined { - return value === null || value === undefined -} - -export function isArray(value: any): value is any[] { - return Array.isArray(value) -} - -export function isExternal(path: string): boolean { - return outboundRE.test(path) -} - -export function isActive(route: any, path?: string): boolean { - if (path === undefined) - return false - - const routePath = normalize(route.path) - const pagePath = normalize(path) - - return routePath === pagePath -} - -export function normalize(path: string): string { - return decodeURI(path).replace(hashRE, '').replace(extRE, '') -} - -export function joinUrl(base: string, path: string): string { - const baseEndsWithSlash = base.endsWith('/') - const pathStartsWithSlash = path.startsWith('/') - - if (baseEndsWithSlash && pathStartsWithSlash) - return base.slice(0, -1) + path - - if (!baseEndsWithSlash && !pathStartsWithSlash) - return `${base}/${path}` - - return base + path -} - -/** - * get the path without filename (the last segment). for example, if the given - * path is `/guide/getting-started.html`, this method will return `/guide/`. - * Always with a trailing slash. - */ -export function getPathDirName(path: string): string { - const segments = path.split('/') - - if (segments[segments.length - 1]) - segments.pop() - - return ensureEndingSlash(segments.join('/')) -} - -export function ensureSlash(path: string): string { - return ensureEndingSlash(ensureStartingSlash(path)) -} - -export function ensureStartingSlash(path: string): string { - return /^\//.test(path) ? path : `/${path}` -} - -export function ensureEndingSlash(path: string): string { - return /(\.html|\/)$/.test(path) ? path : `${path}/` -} - -/** - * Remove `.md` or `.html` extension from the given path. It also converts - * `index` to slush. - */ -export function removeExtension(path: string): string { - return path.replace(/(index)?(\.(md|html))?$/, '') || '/' -} diff --git a/components.d.ts b/components.d.ts index 8bb786d..b34c1cc 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,10 +8,7 @@ export {} declare module 'vue' { export interface GlobalComponents { Arrow: typeof import('./.vitepress/@slidev/client/builtin/Arrow.vue')['default'] - ArrowLeft: typeof import('./.vitepress/theme/components/icons/ArrowLeft.vue')['default'] - ArrowRight: typeof import('./.vitepress/theme/components/icons/ArrowRight.vue')['default'] AutoFitText: typeof import('./.vitepress/@slidev/client/builtin/AutoFitText.vue')['default'] - BooleanDisplay: typeof import('./.vitepress/theme/components/BooleanDisplay.vue')['default'] 'Carbon:chevronLeft': typeof import('~icons/carbon/chevron-left')['default'] 'Carbon:chevronRight': typeof import('~icons/carbon/chevron-right')['default'] CarbonApps: typeof import('~icons/carbon/apps')['default'] @@ -31,21 +28,17 @@ declare module 'vue' { CarbonUserSpeaker: typeof import('~icons/carbon/user-speaker')['default'] CarbonVideo: typeof import('~icons/carbon/video')['default'] CodeBlockWrapper: typeof import('./.vitepress/@slidev/client/builtin/CodeBlockWrapper.vue')['default'] - DarkModeSwitch: typeof import('./.vitepress/theme/components/DarkModeSwitch.vue')['default'] - Demo: typeof import('./.vitepress/theme/components/demo/Demo.vue')['default'] - DemoContainer: typeof import('./.vitepress/theme/components/DemoContainer.vue')['default'] - DemoEditor: typeof import('./.vitepress/theme/components/demo/DemoEditor.vue')['default'] - DemoSlide: typeof import('./.vitepress/theme/components/demo/DemoSlide.vue')['default'] + Demo: typeof import('./.vitepress/theme/components/Demo.vue')['default'] + DemoEditor: typeof import('./.vitepress/theme/components/DemoEditor.vue')['default'] + DemoSlide: typeof import('./.vitepress/theme/components/DemoSlide.vue')['default'] Environment: typeof import('./.vitepress/theme/components/Environment.vue')['default'] + LandingPage: typeof import('./.vitepress/theme/components/LandingPage.vue')['default'] Link: typeof import('./.vitepress/@slidev/client/builtin/Link.vue')['default'] LogosVue: typeof import('~icons/logos/vue')['default'] MdiAccountCircle: typeof import('~icons/mdi/account-circle')['default'] Mermaid: typeof import('./.vitepress/@slidev/client/builtin/Mermaid.vue')['default'] Monaco: typeof import('./.vitepress/@slidev/client/builtin/Monaco.vue')['default'] - Moon: typeof import('./.vitepress/theme/components/icons/Moon.vue')['default'] - OutboundLink: typeof import('./.vitepress/theme/components/icons/OutboundLink.vue')['default'] PlantUml: typeof import('./.vitepress/@slidev/client/builtin/PlantUml.vue')['default'] - README: typeof import('./.vitepress/theme/components/icons/README.md')['default'] RenderWhen: typeof import('./.vitepress/@slidev/client/builtin/RenderWhen.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] @@ -55,14 +48,13 @@ declare module 'vue' { SlidesTotal: typeof import('./.vitepress/@slidev/client/builtin/SlidesTotal.vue')['default'] Starport: typeof import('vue-starport')['Starport'] StarportCarrier: typeof import('vue-starport')['StarportCarrier'] - Sun: typeof import('./.vitepress/theme/components/icons/Sun.vue')['default'] ThemeGallery: typeof import('./.vitepress/theme/components/ThemeGallery.vue')['default'] ThemeInfo: typeof import('./.vitepress/theme/components/ThemeInfo.vue')['default'] + TheTweet: typeof import('./.vitepress/theme/components/TheTweet.vue')['default'] Toc: typeof import('./.vitepress/@slidev/client/builtin/Toc.vue')['default'] TocList: typeof import('./.vitepress/@slidev/client/builtin/TocList.vue')['default'] - ToggleSideBarButton: typeof import('./.vitepress/theme/components/ToggleSideBarButton.vue')['default'] Transform: typeof import('./.vitepress/@slidev/client/builtin/Transform.vue')['default'] - Tweet: typeof import('./.vitepress/theme/components/Tweet.vue')['default'] + Tweet: typeof import('./.vitepress/@slidev/client/builtin/Tweet.vue')['default'] TwemojiCatWithTearsOfJoy: typeof import('~icons/twemoji/cat-with-tears-of-joy')['default'] UimRocket: typeof import('~icons/uim/rocket')['default'] Youtube: typeof import('./.vitepress/@slidev/client/builtin/Youtube.vue')['default'] diff --git a/guide/drawing.md b/guide/drawing.md index 382da1e..24f7a60 100644 --- a/guide/drawing.md +++ b/guide/drawing.md @@ -6,7 +6,7 @@ We have [drauu](https://github.com/antfu/drauu) built-in for drawing and annotat To start, click the icon in the toolbar and start drawing. It's also available in the [Presenter Mode](/guide/presenter-mode). Drawings and annotations you created will be **synced up** automatically across all instances in real-time. - + ## Use with Stylus Pen diff --git a/guide/editors.md b/guide/editors.md index 3e92209..c9700e4 100644 --- a/guide/editors.md +++ b/guide/editors.md @@ -40,4 +40,4 @@ The VS Code extension provides some features to help you better organize your sl ![](https://user-images.githubusercontent.com/11247099/116809994-cc2caa00-ab73-11eb-879f-60585747c3c9.png) - + diff --git a/guide/recording.md b/guide/recording.md index 5b28b06..3a81163 100644 --- a/guide/recording.md +++ b/guide/recording.md @@ -6,7 +6,7 @@ Slidev has a built-in recording and camera view. You can use them to record your Click the button in the navigation panel to show your camera view in the presentation. You can drag to move it, and use the handler on the right bottom corner to resize it. The size and position will persist in `localStorage` and will therefore be consistent across multiple refreshes, so no need to worry about that. - + ## Recording diff --git a/guide/syntax.md b/guide/syntax.md index 65df553..a1335ec 100644 --- a/guide/syntax.md +++ b/guide/syntax.md @@ -497,7 +497,7 @@ Learn more about [frontmatter configurations](/custom/#frontmatter-configures). Slidev comes with LaTeX support out-of-box, powered by [KaTeX](https://katex.org/). - + ### Inline diff --git a/index.md b/index.md index 72fc3e4..70a3a9d 100644 --- a/index.md +++ b/index.md @@ -1,37 +1,5 @@ --- layout: home - -# hero: -# name: Slidev -# text: For Developers -# tagline: Presentation Slides for Developers -# image: -# src: /logo.svg -# alt: Slidev -# actions: -# - theme: brand -# text: Get Started -# link: /guide/ -# - theme: alt -# text: Why -# link: /guide/why --- -
-
-

Slidev

- Slidev -

Presentation Slides for Developers

- -
-
-
- - - -
-
-
+ From f6bcb597777955c1bfc329d6f0ea11d06e77d8d9 Mon Sep 17 00:00:00 2001 From: Julien Deniau <1398469+jdeniau@users.noreply.github.com> Date: Sun, 4 Feb 2024 19:57:20 +0100 Subject: [PATCH 127/134] docs: layout image: add backgroundSize doc (#164) --- builtin/layouts.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/builtin/layouts.md b/builtin/layouts.md index b3aac08..01c942d 100644 --- a/builtin/layouts.md +++ b/builtin/layouts.md @@ -79,6 +79,25 @@ image: ./path/to/the/image --- ``` +You can change the default background size (`cover`) by adding the `backgroundSize` attribute: + +```yaml +--- +layout: image +image: ./path/to/the/image +backgroundSize: contain +--- +``` + +```yaml +--- +layout: image-left +image: ./path/to/the/image +backgroundSize: 20em 70% +--- +``` + + ### `iframe-left` Shows a web page on the left side of the screen, the content will be placed on the right side. From 9bbccbb1bd2d1d93f3d376ed06c73986710dd518 Mon Sep 17 00:00:00 2001 From: George <31376482+george-gca@users.noreply.github.com> Date: Sun, 4 Feb 2024 20:03:07 -0300 Subject: [PATCH 128/134] docs: updated GitHub actions versions on hosting.md (#163) --- guide/hosting.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/guide/hosting.md b/guide/hosting.md index 6f7b738..e373669 100644 --- a/guide/hosting.md +++ b/guide/hosting.md @@ -169,9 +169,9 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 'lts/*' @@ -181,15 +181,15 @@ jobs: - name: Build run: npm run build -- --base // - - uses: actions/configure-pages@v3 + - uses: actions/configure-pages@v4 - - uses: actions/upload-pages-artifact@v1 + - uses: actions/upload-pages-artifact@v3 with: path: dist - name: Deploy id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4 ``` - In your repository, go to Settings>Pages. Under "Build and deployment", select "Github Actions". - Finally, after all workflows are executed, a link to the slides should appear under Settings>Pages. From e52d01f8924fc2746acb41ca2510db795a7b0c4a Mon Sep 17 00:00:00 2001 From: Ethan Niser <100045248+ethanniser@users.noreply.github.com> Date: Tue, 6 Feb 2024 03:39:12 -0600 Subject: [PATCH 129/134] docs: add 'cards' prop in Tweet component (#166) --- builtin/components.md | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/components.md b/builtin/components.md index be2a9c8..35cbc0b 100644 --- a/builtin/components.md +++ b/builtin/components.md @@ -241,6 +241,7 @@ Parameters: * `id` (`number | string`, required): id of the tweet * `scale` (`number | string`, default `1`): transform scale value * `conversation` (`string`, default `'none'`): [tweet embed parameter](https://developer.twitter.com/en/docs/twitter-for-websites/embedded-tweets/guides/embedded-tweet-parameter-reference) +* `cards` (`'hidden' | 'visible'`, default `'visible'`): [tweet embed parameter](https://developer.twitter.com/en/docs/twitter-for-websites/embedded-tweets/guides/embedded-tweet-parameter-reference) ### `VAfter`, `VClick` and `VClicks` From 2ff459093d432ffb43fa5738d207017ad78a7b38 Mon Sep 17 00:00:00 2001 From: _Kerman Date: Sun, 11 Feb 2024 22:09:25 +0800 Subject: [PATCH 130/134] fix: components not found (#165) (#167) --- vite.config.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 88feddb..eba4341 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -33,9 +33,7 @@ export default defineConfig({ './.vitepress/@slidev/client/builtin', ], extensions: ['vue', 'md'], - include: [ - /\.(vue|md)$/, - ], + include: [/\.vue$/, /\.vue\?vue/, /\.md$/], resolvers: [ IconsResolver({ prefix: '', From dbfb0168dc2a10c37d04f991ec135a402b411f02 Mon Sep 17 00:00:00 2001 From: Bogdan Cerovac Date: Sun, 11 Feb 2024 15:31:54 +0100 Subject: [PATCH 131/134] docs: added info about the possibility to start YouTube video at specific time (#168) --- builtin/components.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/components.md b/builtin/components.md index 35cbc0b..7e333f1 100644 --- a/builtin/components.md +++ b/builtin/components.md @@ -262,6 +262,8 @@ Parameters: * `width` (`number`): width of the video * `height` (`number`): height of the video +You can also make the video start at specific time if you add `?start=1234` to the id value (where 1234 are seconds), + ## Custom Components Create a directory `components/` under your project root, and simply put your custom Vue components under it, then you can use it with the same name in your markdown file! From 178a989f589711edd18c5f67699e14917e0fae0b Mon Sep 17 00:00:00 2001 From: _Kerman Date: Thu, 15 Feb 2024 16:55:30 +0800 Subject: [PATCH 132/134] docs: update docs about click animations (#169) Co-authored-by: Anthony Fu --- guide/animations.md | 181 ++++++++++++++++++++++++++++++++------------ guide/syntax.md | 49 ++++-------- 2 files changed, 144 insertions(+), 86 deletions(-) diff --git a/guide/animations.md b/guide/animations.md index a00268a..393b761 100644 --- a/guide/animations.md +++ b/guide/animations.md @@ -1,51 +1,59 @@ +--- +outline: deep +--- + # Animations ## Click Animations +> [!NOTE] +> Since v0.48.0, we are rewritten the click animations system with much more consistent behaviors. It might change the behaviors of your existing slides in edge cases. While this page is showing the new click system, you can find more details about the refactor in [#1279](https://github.com/slidevjs/slidev/pull/1279). + ### `v-click` To apply "click animations" for elements, you can use the `v-click` directive or `` components ```md -# Hello - - - - -Hello World - - - - -
+ + Hello **World** -Hey! - -
+ +
Hey!
``` ### `v-after` -The usage of `v-after` is similar to `v-click` but it will turn the element visible when the previous `v-click` is triggered. +`v-after` is only provided as a directive. It will turn the element visible when the previous `v-click` is triggered. ```md -
Hello
-
World
+
Hello
+
World
``` -When you click the "next" button, both `Hello` and `World` will show up together. +When you press "next", both `Hello` and `World` will show up together. -### `v-click-hide` +### Hide after clicking -Same as `v-click` but instead of making the element appear, it makes the element invisible after clicking. +Add a `.hide` modifier to `v-click` or `v-after` to make the element invisible after clicking, instead of showing up. ```md -
Hello
+
Visible after 1 click
+
Hidden after 2 click
+
Hidden after 2 click
+``` + +For `v-click` component, you can use the `hide` prop to achieve the same effect: + +```md + Visible after 1 click + Hidden after 2 click ``` ### `v-clicks` -`v-clicks` is only provided as a component. It's a shorthand to apply the `v-click` directive to all its child elements. It is especially useful when working with lists. +`v-clicks` is only provided as a component. It's a shorthand to apply the `v-click` directive to all its child elements. It is especially useful when working with lists and tables. ```md @@ -53,14 +61,12 @@ Same as `v-click` but instead of making the element appear, it makes the element - Item 1 - Item 2 - Item 3 -- Item 4 ``` An item will become visible each time you click "next". - -It accepts a `depth` props for nested list: +It accepts a `depth` prop for nested list: ```md @@ -75,44 +81,108 @@ It accepts a `depth` props for nested list: ``` -### Custom Clicks Count +Also, you can use the `every` prop to specify the number of items to show after each click: -By default, Slidev counts how many steps are needed before going to the next slide. You can override this setting by passing the `clicks` frontmatter option: +```md + -```yaml ---- -# 10 clicks in this slide, before going to the next -clicks: 10 ---- +- Item 1 (part 1) +- Item 1 (part 2) +- Item 2 (part 1) +- Item 2 (part 2) + + ``` -### Ordering +### Positioning -Passing the click index to your directives, you can customize the order of the revealing +By default, the clicking animations take place one by one. You can customize the animation position of elements by using the `at` prop or the `v-click` directive with value. -```md -
1
-
2
-
3
+Like the CSS layout system, click-animated elements can be "relative" or "absolute": + +#### Relative Position + +This actual position of relative elements are calculated based on the previous relative elements: + +~~~md +
visible after 1 click
+
visible after 3 clicks
+
hidden after 2 clicks
+ +```js {none|1|2}{at:'+5'} +1 // highlighted after 7 clicks +2 // highlighted after 8 clicks ``` +~~~ + +> [!NOTE] +> The default value of `v-click` is `'+1'` when you don't specify it. + +In fact, `v-after` are just shortcuts for `v-click` with `at` prop: ```md - -
1
-
2
-
3
+ + + + + + + + ``` -```md ---- -clicks: 3 ---- +:::info +Only string values start with `'+'` or `'-'` like `'+1'` are treated as relative positions: - - -
Hi
-
+| Value | Kind | +| -------------- | -------- | +| `'-1'`, `'+1'` | Relative | +| `+1` === `1` | Absolute | +| `'1'` | Absolute | + +So don't forget the single quotes for the relative values. +::: + +#### Absolute Position + +The given value is the exact click count to show the element: + +~~~md +
visible after 3 clicks
+
visible after 2 clicks
+
hidden after 1 click
+ +```js {none|1|2}{at:3} +1 // highlighted after 3 clicks +2 // highlighted after 4 clicks ``` +~~~ + +#### Mixed Case + +You can mix the absolute and relative positions: + +~~~md +
visible after 1 click
+
visible after 3 clicks
+
visible after 2 click
+
visible after 1 click
+
visible after 4 clicks
+~~~ + +The following example synchronizes the highlighting of the two code blocks: + +~~~md +```js {1|2}{at:1} +1 + 1 +'a' + 'b' +``` + +```js {1|2}{at:1} +2 +'ab' +``` +~~~ ### Enter & Leave @@ -124,6 +194,17 @@ You can also specify the enter and leave index for the `v-click` directive by pa
This will be shown on the 2nd and 3rd clicks, and hide again after the 4th.
``` +### Custom Total Clicks Count + +By default, Slidev counts how many steps are needed before going to the next slide. You can override this setting by passing the `clicks` frontmatter option: + +```yaml +--- +# 10 clicks in this slide, before going to the next +clicks: 10 +--- +``` + ### Element Transitions When you apply the `v-click` directive to your elements, it will attach the class name `slidev-vclick-target` to it. When the elements are hidden, the class name `slidev-vclick-hidden` will also be attached. For example: diff --git a/guide/syntax.md b/guide/syntax.md index a1335ec..d0cd2de 100644 --- a/guide/syntax.md +++ b/guide/syntax.md @@ -120,20 +120,7 @@ function add( ``` ~~~ -You can enable line number to all slides by setting `lineNumbers: true` on the config or enable each code block individually by setting `lines:true`. In case you want to disable the numbering for an specific block when `lineNumbers: true` you can set `lines:false` for that block: - -~~~md -```ts {2,3}{lines:true} -function add( - a: Ref | number, - b: Ref | number -) { - return computed(() => unref(a) + unref(b)) -} -``` -~~~ - -You can also set the starting line for each code block and highlight the lines accordingly, defaults to 1: +You can enable line number to all slides by setting `lineNumbers: true` on the config or enable each code block individually by setting `lines:true`. You can also set the starting line for each code block and highlight the lines accordingly, defaults to 1: ~~~md ```ts {6,7}{lines:true, startLine:5} @@ -146,7 +133,7 @@ function add( ``` ~~~ -To change the highlight in multiple steps, you can use `|` to separate them. For example +To change the highlight in multiple clicks, you can use `|` to separate them: ~~~md ```ts {2-3|5|all} @@ -159,12 +146,12 @@ function add( ``` ~~~ -This will first highlight `a: Ref | number` and `b: Ref | number`, and then `return computed(() => unref(a) + unref(b))` after one click, and lastly, the whole block. Learn more in the [clicks animations guide](/guide/animations). +This will first highlight `a: Ref | number` and `b: Ref | number`, and then `return computed(() => unref(a) + unref(b))` after one click, and lastly, the whole block. -You can start the highlight at a specific click: +You can set the line number to `hide` to hide the code block or `none` to not highlight any line: ~~~md -```ts {2-3|5|all}{at:0} +```ts {hide|none} function add( a: Ref | number, b: Ref | number @@ -174,26 +161,14 @@ function add( ``` ~~~ -This is especially useful when you need to sync different animations (when using `two-cols` layout and list animation for instance). -You may need to set the [custom clicks count](/guide/animations#custom-clicks-count) for the slide progression to function correctly. - -To skip highlighting any lines, you can set the line number to `0`. For example +::: tip +Learn more in the [clicks animations guide](./animations#positioning). +::: -~~~md {1} -```ts {0} -function add( - a: Ref | number, - b: Ref | number -) { - return computed(() => unref(a) + unref(b)) -} -``` -~~~ -If the code doesn't fit into one slide, you can pass an extra maxHeight option which will set fixed height -and enable scrolling +If the code doesn't fit into one slide, you use the `maxHeight` to set fixed height and enable scrolling: -~~~md {1} +~~~md ```ts {2|3|7|12}{maxHeight:'100px'} function add( a: Ref | number, @@ -469,7 +444,7 @@ You can import code snippets from existing files via following syntax: <<< @/snippets/snippet.js ``` -::: ttp +::: tip The value of `@` corresponds to the source root, the directory where the `slides.md` is located. ::: @@ -546,6 +521,8 @@ $$ {1|3|all} $$ ``` +The `at` and `finally` options of [code blocks](#line-highlighting) are also available for LaTeX blocks. + ## Diagrams You can also create diagrams / graphs from textual descriptions in your Markdown, powered by [Mermaid](https://mermaid-js.github.io/mermaid). From 5bb36b886ae9009e4661ee060cce1d86954d7280 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Thu, 15 Feb 2024 09:56:57 +0100 Subject: [PATCH 133/134] chore: update lint --- .vitepress/config.ts | 3 +-- .vitepress/theme/components/TheTweet.vue | 4 ++-- builtin/layouts.md | 1 - guide/hosting.md | 12 ++++++------ guide/syntax.md | 1 - 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 8c5d9e1..c3faaee 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -1,9 +1,8 @@ import type { DefaultTheme } from 'vitepress' import { defineConfig } from 'vitepress' import { transformerTwoslash } from '@shikijs/vitepress-twoslash' -import vite from '../vite.config' -const CURRENT_VERSION = '0.47.1' +const CURRENT_VERSION = '0.48.0-beta.2' const Guide: DefaultTheme.NavItemWithLink[] = [ { diff --git a/.vitepress/theme/components/TheTweet.vue b/.vitepress/theme/components/TheTweet.vue index 9bf610e..f822111 100644 --- a/.vitepress/theme/components/TheTweet.vue +++ b/.vitepress/theme/components/TheTweet.vue @@ -23,7 +23,7 @@ const vm = getCurrentInstance()! const loaded = ref(false) async function create() { - // @ts-expect-error + // @ts-expect-error Global variable await window.twttr.widgets.createTweet( props.id.toString(), tweet.value, @@ -36,7 +36,7 @@ async function create() { } if (isClient) { - // @ts-expect-error + // @ts-expect-error Global variable if (window?.twttr?.widgets) { onMounted(create) } diff --git a/builtin/layouts.md b/builtin/layouts.md index 01c942d..b04b0cd 100644 --- a/builtin/layouts.md +++ b/builtin/layouts.md @@ -97,7 +97,6 @@ backgroundSize: 20em 70% --- ``` - ### `iframe-left` Shows a web page on the left side of the screen, the content will be placed on the right side. diff --git a/guide/hosting.md b/guide/hosting.md index e373669..26177c0 100644 --- a/guide/hosting.md +++ b/guide/hosting.md @@ -106,15 +106,15 @@ We recommend to use `npm init slidev@latest` to scaffold your project, which con Create `netlify.toml` in your project root with the following content. -```ts -[build.environment] -NODE_VERSION = '14' - - [build] +```toml +[build] publish = 'dist' command = 'npm run build' - [[redirects]] +[build.environment] +NODE_VERSION = '20' + +[[redirects]] from = '/*' to = '/index.html' status = 200 diff --git a/guide/syntax.md b/guide/syntax.md index d0cd2de..33f5f3a 100644 --- a/guide/syntax.md +++ b/guide/syntax.md @@ -165,7 +165,6 @@ function add( Learn more in the [clicks animations guide](./animations#positioning). ::: - If the code doesn't fit into one slide, you use the `maxHeight` to set fixed height and enable scrolling: ~~~md From 081241c66e4b17a1a524facc9585f0b6f74f5699 Mon Sep 17 00:00:00 2001 From: Stefan Freitag Date: Sun, 18 Feb 2024 09:44:57 +0100 Subject: [PATCH 134/134] docs: fix typo in syntax.md (#171) --- guide/syntax.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/syntax.md b/guide/syntax.md index 33f5f3a..2582f76 100644 --- a/guide/syntax.md +++ b/guide/syntax.md @@ -646,9 +646,9 @@ src: ./content.md > Available since v0.43.0 -Slidev has and experimental support for [MDC (Markdown Components) Syntax](https://content.nuxtjs.org/guide/writing/mdc) powered by [`markdown-it-mdc`](https://github.com/antfu/markdown-it-mdc). +Slidev has an experimental support for [MDC (Markdown Components) Syntax](https://content.nuxtjs.org/guide/writing/mdc) powered by [`markdown-it-mdc`](https://github.com/antfu/markdown-it-mdc). -You can enable it by add `mdc: true` to the frontmatter of your markdown file. +You can enable it by adding `mdc: true` to the frontmatter of your markdown file. ```md ---