Support Remixicon
:i{class="ri-poker-hearts-fill"}:i{class="ri-poker-clubs-fill"}
Support Button
:btn[Google]{href="https://www.google.com"}:::btn{href="#"}:i{class="ri-share-box-line"} Open in new tab:::Support Github Card
::github{repo="cirry/astro-yi"}Support collapse
:::collapseHello World!:::Open
Hello World!
Support admonitions
:::tip[Customized Title]hello world:::
:::notenote:::
:::cautioncaution:::
:::dangerdanger:::Support mermaid
Use:
- start with ```mermaid
- end with ```
- set markdown frontmatter
mermaid: true.
Mermaid Code:
classDiagramnote "From Duck till Zebra"Animal <|-- Ducknote for Duck "can fly\ncan swim\ncan dive\ncan help in debugging"Animal <|-- FishAnimal <|-- ZebraAnimal : +int ageAnimal : +String genderAnimal: +isMammal()Animal: +mate()class Duck{+String beakColor+swim()+quack()}class Fish{-int sizeInFeet-canEat()}class Zebra{+bool is_wild+run()}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
---mathjax: true---hello!$$ \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!
Inline Mode
---mathjax: true---hello! $ \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.
function demo() { console.log('this line is marked as deleted') // This line and the next one are marked as inserted console.log('this is the second inserted line')
return 'this line uses the neutral default marker type'}Code folding is supported by default
var myArr = [1, 2]console.log(myArr)
var myObj = {a: 1, b: 2}
for (let key of myArr) { console.log(key)}
var it = myArr[Symbol.iterator]()it.next() // {value: 1, done: false}
// VM704:12 Uncaught TypeError: myObj is not iterablefor (let key of myObj) { console.log(key)}