Skip to content

Commit

Permalink
add codly
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeX4 committed Sep 4, 2024
1 parent 62b5acd commit 0acda6d
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 4 deletions.
37 changes: 37 additions & 0 deletions docs/integration/codly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
sidebar_position: 5
---

# Codly

When using Codly, we should initialize it using the `config-common(preamble: {..})` method.

```typst
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#import "@preview/codly:1.0.0": *
#show: codly-init.with()
#show: simple-theme.with(
aspect-ratio: "16-9",
config-common(preamble: {
codly(languages: (
rust: (
name: "Rust",
icon: text(font: "tabler-icons", "\u{fa53}"),
color: rgb("#CE412B"),
),
))
}),
)
== First slide
#raw(lang: "rust", block: true,
`pub fn main() {
println!("Hello, world!");
}`.text)
```

![image](https://github.com/touying-typ/touying/assets/34951714/0be2fbaf-cc03-4776-932f-259503d5e23a)
2 changes: 1 addition & 1 deletion docs/integration/ctheorems.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 6
---

# Ctheorems
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
sidebar_position: 5
---

# Codly

当我们使用 Codly 时,我们可以通过 `config-common(preamble: {..})` 初始化。

```typst
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#import "@preview/codly:1.0.0": *
#show: codly-init.with()
#show: simple-theme.with(
aspect-ratio: "16-9",
config-common(preamble: {
codly(languages: (
rust: (
name: "Rust",
icon: text(font: "tabler-icons", "\u{fa53}"),
color: rgb("#CE412B"),
),
))
}),
)
== First slide
#raw(lang: "rust", block: true,
`pub fn main() {
println!("Hello, world!");
}`.text)
```

![image](https://github.com/touying-typ/touying/assets/34951714/0be2fbaf-cc03-4776-932f-259503d5e23a)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 6
---

# Ctheorems
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
sidebar_position: 5
---

# Codly

当我们使用 Codly 时,我们可以通过 `config-common(preamble: {..})` 初始化。

```typst
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#import "@preview/codly:1.0.0": *
#show: codly-init.with()
#show: simple-theme.with(
aspect-ratio: "16-9",
config-common(preamble: {
codly(languages: (
rust: (
name: "Rust",
icon: text(font: "tabler-icons", "\u{fa53}"),
color: rgb("#CE412B"),
),
))
}),
)
== First slide
#raw(lang: "rust", block: true,
`pub fn main() {
println!("Hello, world!");
}`.text)
```

![image](https://github.com/touying-typ/touying/assets/34951714/0be2fbaf-cc03-4776-932f-259503d5e23a)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 6
---

# Ctheorems
Expand Down
37 changes: 37 additions & 0 deletions versioned_docs/version-0.5.x/integration/codly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
sidebar_position: 5
---

# Codly

When using Codly, we should initialize it using the `config-common(preamble: {..})` method.

```typst
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#import "@preview/codly:1.0.0": *
#show: codly-init.with()
#show: simple-theme.with(
aspect-ratio: "16-9",
config-common(preamble: {
codly(languages: (
rust: (
name: "Rust",
icon: text(font: "tabler-icons", "\u{fa53}"),
color: rgb("#CE412B"),
),
))
}),
)
== First slide
#raw(lang: "rust", block: true,
`pub fn main() {
println!("Hello, world!");
}`.text)
```

![image](https://github.com/touying-typ/touying/assets/34951714/0be2fbaf-cc03-4776-932f-259503d5e23a)
2 changes: 1 addition & 1 deletion versioned_docs/version-0.5.x/integration/ctheorems.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 6
---

# Ctheorems
Expand Down

0 comments on commit 0acda6d

Please sign in to comment.