Support Remixicon
1:i{class="ri-poker-hearts-fill"}2:i{class="ri-poker-clubs-fill"}
Support Button
1:btn[Google]{href="https://www.google.com"}1:::btn{href="#"}2:i{class="ri-share-box-line"} Open in new tab3:::Support Github Card
1::github{repo="cirry/astro-yi"}Support collapse
1:::collapse2Hello World!3:::展开
Hello World!
Support admonitions
1:::tip[Customized Title]2hello world3:::4
5:::note6note7:::8
9:::caution10caution11:::12
13:::danger14danger15:::Support mermaid
Use:
- start with ```mermaid
- end with ```
- set markdown frontmatter
mermaid: true.
Mermaid Code:
1classDiagram2note "From Duck till Zebra"3Animal <|-- Duck4note for Duck "can fly\ncan swim\ncan dive\ncan help in debugging"5Animal <|-- Fish6Animal <|-- Zebra7Animal : +int age8Animal : +String gender9Animal: +isMammal()10Animal: +mate()11class Duck{12+String beakColor13+swim()14+quack()15}8 collapsed lines
16class Fish{17-int sizeInFeet18-canEat()19}20class Zebra{21+bool is_wild22+run()23}Result:
classDiagram
note "From Duck till Zebra"
Animal <|-- Duck
note for Duck "can fly\ncan swim\ncan dive\ncan help in debugging"
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
Support mathjax
- set markdown frontmatter
mathjax: true.
Block Mode
1---2mathjax: true3---4hello!5$$ \sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t $$6hello!hello! $$ \sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t $$ hello!
Inline Mode
1---2mathjax: true3---4hello! $ \sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t $ hello!hello! $ \sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t $ hello!
Integration with Expressive Code
For more usage, please refer to the official website expressive-code.
1function demo() {2 console.log('this line is marked as deleted')3 // This line and the next one are marked as inserted4 console.log('this is the second inserted line')5
6 return 'this line uses the neutral default marker type'7}Code folding is supported by default
1var myArr = [1, 2]2console.log(myArr)3
4var myObj = {a: 1, b: 2}5
6for (let key of myArr) {7 console.log(key)8}9
10var it = myArr[Symbol.iterator]()11it.next() // {value: 1, done: false}12
13// VM704:12 Uncaught TypeError: myObj is not iterable14for (let key of myObj) {15 console.log(key)1 collapsed line
16}
