fix: add content binding to Base for live editing navigation

Pass content={{ collection: "homepage", id: homepage.data.id, slug: "main" }}
to Base layout — same pattern as posts and pages. This enables the live
editor to navigate to the correct admin panel entry instead of jumping.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kunthawat Greethong
2026-04-30 11:48:48 +07:00
parent 07725f9023
commit 18d65aaf57

View File

@@ -7,7 +7,9 @@ const { entry: homepage } = await getEmDashEntry("homepage", "main");
Astro.cache.set(homepage.cacheHint);
const d = homepage.data;
---
<Base title="EmDash CMS - Self-Hosted for Astro" description="Fully self-hosted CMS for Astro. No cloud required, fully local, with admin panel, authentication, and plugin system.">
<Base title="EmDash CMS - Self-Hosted for Astro" description="Fully self-hosted CMS for Astro. No cloud required, fully local, with admin panel, authentication, and plugin system."
content={{ collection: "homepage", id: homepage.data.id, slug: "main" }}
>
<main class="landing">
<!-- Hero Section -->
<section class="hero">