Skip to content

Commit 1317cbc

Browse files
authored
docs: updates for 0.40.5 (#119)
1 parent 46f1104 commit 1317cbc

File tree

5 files changed

+92
-1
lines changed

5 files changed

+92
-1
lines changed

custom/index.md

+21
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,32 @@ drawings:
8181
persist: false
8282
presenterOnly: false
8383
syncAll: true
84+
85+
# HTML tag attributes
86+
htmlAttrs:
87+
dir: 'ltr'
88+
lang: 'en'
8489
---
8590
```
8691

8792
Check out the [type definitions](https://github.com./slidevjs/slidev/blob/main/packages/types/src/config.ts) for more options.
8893

94+
## Per slide configuration
95+
96+
In addition, every slide accepts the following configuration in the Frontmatter block:
97+
98+
* `clicks` (`number`): Custom clicks count (learn more [here](/guide/animations.html#custom-clicks-count)).
99+
* `disabled` (`boolean`): Completely disable the slide.
100+
* `hide` (`boolean`): Hide sub-slides when using `src` (learn more [here](/guide/syntax.html#multiple-entries)).
101+
* `hideInToc` (`boolean`): Hide the slide for the `<Toc>` components (learn more [here](/builtin/components.html#toc)).
102+
* `layout` (`string`): Defines the layout component applied to the slide (learn more [here](/guide/syntax.html#front-matter-layouts) and [here](/builtin/layouts.html)).
103+
* `level` (`number`): Override the title level for the `<Title>` and `<Toc>` components (only if `title` has also been declared, learn more [here](/builtin/components.html#titles)).
104+
* `preload` (`boolean`, default `true`): preload the next slide (learn more [here](/guide/animations.html#motion)).
105+
* `routeAlias` (`string`): create a route alias that can be used in the URL or with the `<Link>` component (learn more [here](/builtin/components.html#link)).
106+
* `src` (`string`): Includes a markdown file (learn more [here](/guide/syntax.html#multiple-entries)).
107+
* `title` (`string`): Override the title for the `<Title>` and `<Toc>` components (learn more [here](/builtin/components.html#titles)).
108+
* `transition` (`string | TransitionProps`): Defines the transition between the slide and the next one (learn more [here](/guide/animations.html#slide-transitions)).
109+
89110
## Directory Structure
90111

91112
Slidev uses directory structure conventions to minimalize the configuration surface and make extensions in functionality flexible and intuitive.

guide/animations.md

+15
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,21 @@ Same as `v-click` but instead of making the element appear, it makes the element
6060

6161
An item will become visible each time you click "next".
6262

63+
It accepts a `depth` props for nested list:
64+
65+
```md
66+
<v-clicks depth="2">
67+
68+
- Item 1
69+
- Item 1.1
70+
- Item 1.2
71+
- Item 2
72+
- Item 2.1
73+
- Item 2.2
74+
75+
</v-clicks>
76+
```
77+
6378
### Custom Clicks Count
6479

6580
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:

guide/exporting.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,24 @@ $ slidev export --range 1,6-8,10
9797

9898
This option accepts both specific slide numbers and ranges.
9999

100-
The example above would export slides 1,6,7,8, and 10.
100+
The example above would export slides 1,6,7,8, and 10.
101+
102+
103+
### Multiple entries
104+
105+
You can also export multiple slides at once.
106+
107+
```bash
108+
$ slidev export slides1.md slides1.md
109+
```
110+
111+
Or
112+
113+
```bash
114+
$ slidev export *.md
115+
```
116+
117+
In this case, each input file will generate its own PDf file.
101118

102119
## Presenter notes
103120

@@ -109,6 +126,8 @@ Export only the presenter notes (the last comment block for each slide) into a t
109126
$ slidev export-notes
110127
```
111128

129+
This command also accept multiple entries like for the [export command](#multiple-entries)
130+
112131
## Single-Page Application (SPA)
113132

114133
See [Static Hosting](/guide/hosting).

guide/hosting.md

+16
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,22 @@ By passing the `--watch` option the build will run in watch mode and will rebuil
7272
$ slidev build --watch
7373
```
7474

75+
### Multiple entries
76+
77+
You can also build multiple slides at once.
78+
79+
```bash
80+
$ slidev build slides1.md slides1.md
81+
```
82+
83+
Or
84+
85+
```bash
86+
$ slidev build *.md
87+
```
88+
89+
In this case, each input file will generate a folder containing the build in the output directory.
90+
7591
## Examples
7692

7793
Here are a few examples of the exported SPA:

guide/syntax.md

+20
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,26 @@ console.log('HelloWorld')
145145

146146
Learn more about [configuring Monaco](/custom/config-monaco).
147147

148+
### Monaco diff
149+
150+
Monaco can also generate a diff between two code blocks. Use `{monaco-diff}` to turn the block into a [diff Monaco editor](https://microsoft.github.io/monaco-editor/playground.html?source=v0.36.1#example-creating-the-diffeditor-multi-line-example) and use `~~~` to separate both original and modified version of the code!
151+
152+
```md
153+
//```ts {monaco-diff}
154+
This line is removed on the right.
155+
just some text
156+
abcd
157+
efgh
158+
Some more text
159+
~~~
160+
just some text
161+
abcz
162+
zzzzefgh
163+
Some more text.
164+
This line is removed on the left.
165+
//```
166+
```
167+
148168
## Embedded Styles
149169

150170
You can use `<style>` tag in your Markdown directly to override styles for the **current slide**.

0 commit comments

Comments
 (0)