Skip to content

Commit c07949d

Browse files
janvennemannulivz
authored andcommitted
fix: markdown slots doesn't work (close: #1048)(#1054)
It's because we didn't read slotKey prop at Content component This commit also updated the documentation.
1 parent 4f505a8 commit c07949d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: packages/@vuepress/core/lib/app/components/Content.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default {
1919
class: [data.class, data.staticClass],
2020
style: data.style,
2121
props: {
22-
slotKey: props.slot || 'default'
22+
slotKey: props.slotKey || 'default'
2323
}
2424
})
2525
}

Diff for: packages/docs/docs/guide/markdown-slot.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ Markdown Slot is to solve this kind of problem.
1717
You can define a named markdown slot through the following markdown syntax:
1818

1919
``` md
20-
::: slot [$name]
20+
::: slot name
2121

2222
:::
2323
```
2424

2525
Use the `Content` component to use the slot in the layout component:
2626

2727
``` vue
28-
<Content slot="$name"/>
28+
<Content slot-key="name"/>
2929
```
3030

3131
## Default Slot Content

0 commit comments

Comments
 (0)