Skip to content

Commit 0acda6d

Browse files
committed
add codly
1 parent 62b5acd commit 0acda6d

File tree

8 files changed

+152
-4
lines changed

8 files changed

+152
-4
lines changed

docs/integration/codly.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
sidebar_position: 5
3+
---
4+
5+
# Codly
6+
7+
When using Codly, we should initialize it using the `config-common(preamble: {..})` method.
8+
9+
```typst
10+
#import "@preview/touying:0.5.2": *
11+
#import themes.simple: *
12+
#import "@preview/codly:1.0.0": *
13+
14+
#show: codly-init.with()
15+
16+
#show: simple-theme.with(
17+
aspect-ratio: "16-9",
18+
config-common(preamble: {
19+
codly(languages: (
20+
rust: (
21+
name: "Rust",
22+
icon: text(font: "tabler-icons", "\u{fa53}"),
23+
color: rgb("#CE412B"),
24+
),
25+
))
26+
}),
27+
)
28+
29+
== First slide
30+
31+
#raw(lang: "rust", block: true,
32+
`pub fn main() {
33+
println!("Hello, world!");
34+
}`.text)
35+
```
36+
37+
![image](https://github.com/touying-typ/touying/assets/34951714/0be2fbaf-cc03-4776-932f-259503d5e23a)

docs/integration/ctheorems.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 5
2+
sidebar_position: 6
33
---
44

55
# Ctheorems
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
sidebar_position: 5
3+
---
4+
5+
# Codly
6+
7+
当我们使用 Codly 时,我们可以通过 `config-common(preamble: {..})` 初始化。
8+
9+
```typst
10+
#import "@preview/touying:0.5.2": *
11+
#import themes.simple: *
12+
#import "@preview/codly:1.0.0": *
13+
14+
#show: codly-init.with()
15+
16+
#show: simple-theme.with(
17+
aspect-ratio: "16-9",
18+
config-common(preamble: {
19+
codly(languages: (
20+
rust: (
21+
name: "Rust",
22+
icon: text(font: "tabler-icons", "\u{fa53}"),
23+
color: rgb("#CE412B"),
24+
),
25+
))
26+
}),
27+
)
28+
29+
== First slide
30+
31+
#raw(lang: "rust", block: true,
32+
`pub fn main() {
33+
println!("Hello, world!");
34+
}`.text)
35+
```
36+
37+
![image](https://github.com/touying-typ/touying/assets/34951714/0be2fbaf-cc03-4776-932f-259503d5e23a)

i18n/zh/docusaurus-plugin-content-docs/current/integration/ctheorems.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 5
2+
sidebar_position: 6
33
---
44

55
# Ctheorems
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
sidebar_position: 5
3+
---
4+
5+
# Codly
6+
7+
当我们使用 Codly 时,我们可以通过 `config-common(preamble: {..})` 初始化。
8+
9+
```typst
10+
#import "@preview/touying:0.5.2": *
11+
#import themes.simple: *
12+
#import "@preview/codly:1.0.0": *
13+
14+
#show: codly-init.with()
15+
16+
#show: simple-theme.with(
17+
aspect-ratio: "16-9",
18+
config-common(preamble: {
19+
codly(languages: (
20+
rust: (
21+
name: "Rust",
22+
icon: text(font: "tabler-icons", "\u{fa53}"),
23+
color: rgb("#CE412B"),
24+
),
25+
))
26+
}),
27+
)
28+
29+
== First slide
30+
31+
#raw(lang: "rust", block: true,
32+
`pub fn main() {
33+
println!("Hello, world!");
34+
}`.text)
35+
```
36+
37+
![image](https://github.com/touying-typ/touying/assets/34951714/0be2fbaf-cc03-4776-932f-259503d5e23a)

i18n/zh/docusaurus-plugin-content-docs/version-0.5.x/integration/ctheorems.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 5
2+
sidebar_position: 6
33
---
44

55
# Ctheorems
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
sidebar_position: 5
3+
---
4+
5+
# Codly
6+
7+
When using Codly, we should initialize it using the `config-common(preamble: {..})` method.
8+
9+
```typst
10+
#import "@preview/touying:0.5.2": *
11+
#import themes.simple: *
12+
#import "@preview/codly:1.0.0": *
13+
14+
#show: codly-init.with()
15+
16+
#show: simple-theme.with(
17+
aspect-ratio: "16-9",
18+
config-common(preamble: {
19+
codly(languages: (
20+
rust: (
21+
name: "Rust",
22+
icon: text(font: "tabler-icons", "\u{fa53}"),
23+
color: rgb("#CE412B"),
24+
),
25+
))
26+
}),
27+
)
28+
29+
== First slide
30+
31+
#raw(lang: "rust", block: true,
32+
`pub fn main() {
33+
println!("Hello, world!");
34+
}`.text)
35+
```
36+
37+
![image](https://github.com/touying-typ/touying/assets/34951714/0be2fbaf-cc03-4776-932f-259503d5e23a)

versioned_docs/version-0.5.x/integration/ctheorems.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 5
2+
sidebar_position: 6
33
---
44

55
# Ctheorems

0 commit comments

Comments
 (0)