Skip to content

Markdown slot does not work #1048

@georeth

Description

@georeth
  • I confirm that this is a issue rather than a question.

Bug report

I cannot render named slots by <Content slot="$name">. The resulting HTML is always the default one.
Moreover, the document is inconsistent: both <Content slot="$name"> and <Content slot-key="$name"> appears in doc, but none of them works.

Version

1.0.0-alpha.24

Steps to reproduce

I follow the guide (https://vuepress.vuejs.org/guide/markdown-slot.html#example) to play with markdown slots.

This is the repo I used to reproduce the bug: https://github.com/georeth/vp-bugreport

What is expected?

Render the following HTML:

<div>
<header><div class="content header"><h1>This is a header slot</h1></div></header>
<div class="content default"><p>Default Slot</p></div></div>

What is actually happening?

Render the following HTML(https://github.com/georeth/vp-bugreport/blob/master/.vuepress/dist/index.html):

<div>
<header><div class="content default"><p>Default Slot</p></div></header>
<div class="content default"><p>Default Slot</p></div></div>

Note that the default slot appears twice.

Other relevant information

  • Your OS: Ubuntu 18.04
  • Node.js version: v8.10.0
  • Browser version: Google Chrome 70.0.3538.77
  • Is this a global or local install? global install (yarn global add)
  • Which package manager did you use for the install? yarn

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions