Skip to content

Commit

Permalink
fix: markdown slots doesn't work (close: #1048)(#1054)
Browse files Browse the repository at this point in the history
It's because we didn't read slotKey prop at Content component
This commit also updated the documentation.
  • Loading branch information
janvennemann authored and ulivz committed Nov 29, 2018
1 parent 4f505a8 commit c07949d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/@vuepress/core/lib/app/components/Content.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default {
class: [data.class, data.staticClass],
style: data.style,
props: {
slotKey: props.slot || 'default'
slotKey: props.slotKey || 'default'
}
})
}
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/docs/guide/markdown-slot.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Markdown Slot is to solve this kind of problem.
You can define a named markdown slot through the following markdown syntax:

``` md
::: slot [$name]
::: slot name

:::
```

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

``` vue
<Content slot="$name"/>
<Content slot-key="name"/>
```

## Default Slot Content
Expand Down

0 comments on commit c07949d

Please sign in to comment.