Astro Theme Yi

New features

24th March 2024
Last updated:13th May 2024
1 Minutes
180 Words

support mermaid

Use:

  • start with ```mermaid
  • end with ```
  • set markdown frontmatter mermaid: true.

Mermaid Code:

mermaid.md
1
classDiagram
2
note "From Duck till Zebra"
3
Animal <|-- Duck
4
note for Duck "can fly\ncan swim\ncan dive\ncan help in debugging"
5
Animal <|-- Fish
6
Animal <|-- Zebra
7
Animal : +int age
8
Animal : +String gender
9
Animal: +isMammal()
10
Animal: +mate()
11
class Duck{
12
+String beakColor
13
+swim()
14
+quack()
15
}
8 collapsed lines
16
class Fish{
17
-int sizeInFeet
18
-canEat()
19
}
20
class Zebra{
21
+bool is_wild
22
+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.
Mathjax.md
1
---
2
mathjax: true
3
---
4
$$ \displaystyle\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t $$

$$ \displaystyle\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t $$

Code folding is supported by default

1
var myArr = [1,2]
2
console.log(myArr)
3
4
var myObj = {a: 1, b: 2}
5
6
for(let key of myArr){
7
console.log(key)
8
}
9
10
var it = myArr[Symbol.iterator]()
11
it.next() // {value: 1, done: false}
12
13
// VM704:12 Uncaught TypeError: myObj is not iterable
14
for(let key of myObj){
15
console.log(key)
1 collapsed line
16
}
Article title:New features
Article author:Astro-Yi
Release time:24th March 2024