Skip to content

docs: clarify indentation when using components - #482

Merged
farnabaz merged 2 commits into
nuxt-content:mainfrom
oneminch:docs/named-slots
Jun 12, 2026
Merged

farnabaz merged 2 commits into
nuxt-content:mainfrom
oneminch:docs/named-slots

Conversation

@oneminch

@oneminch oneminch commented May 4, 2026

Copy link
Copy Markdown
Contributor

Resolves #456

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

Copilot AI left a comment

Copy link
Copy Markdown

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]
@farnabaz
farnabaz merged commit d6e5fc6 into nuxt-content:main Jun 12, 2026
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

3 participants