0.2.0-27356369.9bdf0bd • Published 2 years ago
@docus/mdc-edge v0.2.0-27356369.9bdf0bd
MDC
Install
# Using Yarn
yarn add --dev @docus/mdc
# Using NPM
npm install --save-dev @docus/mdc
Use
import mdc from '@docus/mdc'
const markdown = `---
frontmatter: data
---
## section title
::custom-component
Default Slot
::
`
await mdc.parse(markdown)
The result will be
{
"body": {
"raw": "---\nfrontmatter: data\n---\n\n## section title\n\n::custom-component\nDefault Slot\n::\n",
"ast": {
"type": "root",
"children": [
{
"type": "element",
"tag": "h2",
"props": {
"id": "section-title"
},
"children": [
{
"type": "element",
"tag": "a",
"props": {
"href": "#section-title"
},
"children": [
{
"type": "text",
"value": "section title"
}
]
}
]
},
{
"type": "text",
"value": "\n"
},
{
"type": "element",
"tag": "custom-component",
"props": {},
"children": [
{
"type": "element",
"tag": "p",
"props": {},
"children": [
{
"type": "text",
"value": "Default Slot"
}
]
}
]
}
]
},
"toc": {
"title": "",
"searchDepth": 2,
"depth": 2,
"links": [
{
"id": "section-title",
"depth": 2,
"text": "section title"
}
]
}
},
"meta": {
"frontmatter": "data",
"empty": false,
"title": "",
"description": ""
}
}
0.2.0-27356369.9bdf0bd
2 years ago
0.2.0-code-fix
2 years ago
0.2.0-27304706.3bb067b
2 years ago
0.2.0-27296722.efcb0c6
2 years ago
0.1.0-27264091.15d67bd
2 years ago
0.1.0-27264090.0ce1ff1
2 years ago
0.1.0-27264086.fddf32d
2 years ago
0.1.0-27272748.7c6ee75
2 years ago
0.1.0-27287479.1ea9971
2 years ago
0.1.0-27264087.92d41dc
2 years ago
0.1.0-27264092.f0c0be6
2 years ago
0.1.0-27264097.a8c1c92
2 years ago
0.1.0-27258621.c996de1
2 years ago
0.1.0-27255713.5af0db0
3 years ago
0.1.0-27255610.1077089
3 years ago
0.1.0-27255654.3ae5aae
3 years ago
0.1.0-27255698.03d00e8
3 years ago
0.1.0-27255632.4466884
3 years ago
0.1.0-27255649.0ddbc7f
3 years ago
0.1.0-27245479.682ab80
3 years ago
0.1.0-27245643.30c8a7c
3 years ago
0.1.0-27245588.6c4c2c2
3 years ago
0.1.0-27223882.ea63b98
3 years ago
0.1.0-27223896.f25079f
3 years ago
0.1.0-27213963.927230d
3 years ago
0.1.0-27213978.98e4a28
3 years ago
0.1.0-27173665.ba0e20e
3 years ago
0.1.0-27173624.4751b70
3 years ago
0.1.0-27173649.24efaec
3 years ago
0.1.0-27172695.c498e3a
3 years ago
0.1.0-27173282.d907274
3 years ago
0.1.0-27171857.026edb0
3 years ago
0.1.0-27172272.3b79861
3 years ago
0.1.0-27171859.e95b510
3 years ago
0.1.0-27172285.16d3b20
3 years ago
0.1.0-27171855.6c63079
3 years ago
0.1.0-27171203.a71d6a2
3 years ago
0.1.0-27167886.7559407
3 years ago
0.1.0-27167658.574375
3 years ago
0.1.0-27166253.bfe54d0
3 years ago