create-slidev 0.48.0-beta.22 → 0.48.0-beta.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/package.json +1 -1
- package/template/slides.md +30 -10
package/package.json
CHANGED
package/template/package.json
CHANGED
package/template/slides.md
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
---
|
|
2
|
+
# try also 'default' to start simple
|
|
2
3
|
theme: seriph
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
# random image from a curated Unsplash collection by Anthony
|
|
5
|
+
# like them? see https://unsplash.com/collections/94734566/slidev
|
|
6
|
+
background: https://cover.sli.dev
|
|
7
|
+
# some information about your slides, markdown enabled
|
|
8
|
+
title: Welcome to Slidev
|
|
7
9
|
info: |
|
|
8
10
|
## Slidev Starter Template
|
|
9
11
|
Presentation slides for developers.
|
|
10
12
|
|
|
11
13
|
Learn more at [Sli.dev](https://sli.dev)
|
|
14
|
+
# apply any unocss classes to the current slide
|
|
15
|
+
class: text-center
|
|
16
|
+
# https://sli.dev/custom/highlighters.html
|
|
17
|
+
highlighter: shiki
|
|
18
|
+
# https://sli.dev/guide/drawing
|
|
12
19
|
drawings:
|
|
13
20
|
persist: false
|
|
14
|
-
|
|
15
|
-
foo: true
|
|
21
|
+
# slide transition: https://sli.dev/guide/animations#slide-transitions
|
|
16
22
|
transition: slide-left
|
|
17
|
-
|
|
23
|
+
# enable MDC Syntax: https://sli.dev/guide/syntax#mdc-syntax
|
|
18
24
|
mdc: true
|
|
19
|
-
monaco: true
|
|
20
|
-
monacoTypesSource: local # or cdn or none
|
|
21
25
|
---
|
|
22
26
|
|
|
23
27
|
# Welcome to Slidev
|
|
@@ -127,7 +131,7 @@ Hover on the bottom-left corner to see the navigation's controls panel, [learn m
|
|
|
127
131
|
|
|
128
132
|
---
|
|
129
133
|
layout: image-right
|
|
130
|
-
image: https://
|
|
134
|
+
image: https://cover.sli.dev
|
|
131
135
|
---
|
|
132
136
|
|
|
133
137
|
# Code
|
|
@@ -558,6 +562,10 @@ hide: false
|
|
|
558
562
|
|
|
559
563
|
# Monaco Editor
|
|
560
564
|
|
|
565
|
+
Slidev provides built-in Moanco Editor support.
|
|
566
|
+
|
|
567
|
+
Add `{monaco}` to the code block to turn it into an editor:
|
|
568
|
+
|
|
561
569
|
```ts {monaco}
|
|
562
570
|
import { ref } from 'vue'
|
|
563
571
|
import hello from './external'
|
|
@@ -566,6 +574,18 @@ const code = ref('const a = 1')
|
|
|
566
574
|
hello()
|
|
567
575
|
```
|
|
568
576
|
|
|
577
|
+
Use `{monaco-run}` to create an editor that can execute the code directly in the slide:
|
|
578
|
+
|
|
579
|
+
```ts {monaco-run}
|
|
580
|
+
function fibonacci(n: number): number {
|
|
581
|
+
return n <= 1
|
|
582
|
+
? n
|
|
583
|
+
: fibonacci(n - 1) + fibonacci(n - 2) // you know, this is NOT the best way to do it :P
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
console.log(Array.from({ length: 10 }, (_, i) => fibonacci(i + 1)))
|
|
587
|
+
```
|
|
588
|
+
|
|
569
589
|
---
|
|
570
590
|
layout: center
|
|
571
591
|
class: text-center
|