YAML
1
2
3
# frontmatter: https://jekyllrb.com/docs/front-matter/
layout: post
title: Blogging Like a HackerMarkdown Basic Syntax
I just love bold text. Italicized text is the cat's meow. At the command prompt, type
nano.- First item
- Second item
- Third item
Dorothy followed her through many of the beautiful rooms in her castle.
JavaScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gfm from '@bytemd/plugin-gfm'
import { Editor, Viewer } from 'bytemd'
const plugins = [
gfm(),
// Add more plugins here
]
const editor = new Editor({
target: document.body, // DOM to render
props: {
value: '',
plugins,
},
})
editor.on('change', (e) => {
editor.$set({ value: e.detail.value })
})GFM Extended Syntax
- Write the press release
- Update the website
- Contact the media
Syntax | Description |
|---|---|
Header | Title |
Paragraph | Text |
Footnotes
Here's a simple footnote,[1] and here's a longer one.[bignote]
[1]
This is the first footnote.
[bignote]
Here's one with multiple paragraphs and code.
Indent paragraphs to include them in the footnote.
{ my code }Add as many paragraphs as you like.
Gemoji
Thumbs up: :+1:, thumbs down: :-1:.
Families: :family_man_man_boy_boy:
Long flags: :wales:, :scotland:, :england:.
Math Equation
Inline math equation:
Mermaid Diagrams
graph TD
mermaid
1
2
graph TD
Start --> StopsequenceDiagram
mermaid
1
2
3
4
sequenceDiagram
Alice->>John: Hello John, how are you?
John-->>Alice: Great!
Alice-)John: See you later!classDiagram
mermaid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
classDiagram
Animal <|-- Duck
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()
}stateDiagram-v2
mermaid
1
2
3
4
5
6
7
8
stateDiagram-v2
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]erDiagram
mermaid
1
2
3
4
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
CUSTOMER }|..|{ DELIVERY-ADDRESS : usesjourney
mermaid
1
2
3
4
5
6
7
8
9
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 5: Megantt
mermaid
1
2
3
4
5
6
7
8
9
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1 , 20d
section Another
Task in sec :2014-01-12 , 12d
another task : 24dpie title Pets adopted by volunteers
mermaid
1
2
3
4
pie title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rats" : 15mermaid
1
2
3
4
5
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
评论栏
分享你的想法,或参与下面的讨论。
参与讨论
支持 Markdown、代码和图片
友善交流,让讨论更有价值。
更多留言
加载中…