Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/loud-glasses-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': patch
---

Fixes missing draft content warning in dev on pages using the hero layout
1 change: 1 addition & 0 deletions packages/starlight/components/ContentNotice.astro
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const { icon, label } = Astro.props;
gap: 0.75em;
font-size: var(--sl-text-body-sm);
line-height: var(--sl-line-height-headings);
text-align: start;
}
}
</style>
3 changes: 3 additions & 0 deletions packages/starlight/components/Hero.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import { Image } from 'astro:assets';
import DraftContentNotice from 'virtual:starlight/components/DraftContentNotice';
import { PAGE_TITLE_ID } from '../constants';
import LinkButton from '../user-components/LinkButton.astro';

Expand Down Expand Up @@ -44,6 +45,7 @@ if (image) {
<div class="sl-flex stack">
<div class="sl-flex copy">
<h1 id={PAGE_TITLE_ID} data-page-title set:html={title} />
{data.draft && <DraftContentNotice />}
{tagline && <div class="tagline" set:html={tagline} />}
</div>
{
Expand All @@ -67,6 +69,7 @@ if (image) {
@layer starlight.core {
.hero {
display: grid;
grid-template-columns: 100%;
align-items: center;
gap: 1rem;
padding-bottom: 1rem;
Expand Down
Loading