Skip to content

docs: clarify indentation when using components#482

Open
oneminch wants to merge 2 commits into
nuxt-content:mainfrom
oneminch:docs/named-slots
Open

docs: clarify indentation when using components#482
oneminch wants to merge 2 commits into
nuxt-content:mainfrom
oneminch:docs/named-slots

Conversation

@oneminch
Copy link
Copy Markdown

@oneminch oneminch commented May 4, 2026

Resolves #456

Copilot AI review requested due to automatic review settings May 4, 2026 19:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the README documentation to clarify how indentation inside MDC container components (::component ... ::) affects slot detection—specifically for named slots—addressing the “named slots don’t work” report in #456.

Changes:

  • Added a new “Slots in MDC components” section explaining indentation requirements for named slot markers.
  • Provided working vs. non-working Markdown examples for slot usage.
  • Added an admonition note describing how indentation may cause content to be parsed as a code block for default slots.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
```html [Alert.vue]
<template>
<div class="alert">
<slot name="slot1"><slot />
Comment thread README.md Outdated
::
```

> [!note]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Named slots don't work

2 participants