diff --git a/examples/with-markdoc/src/pages/index.astro b/examples/with-markdoc/src/pages/index.astro index 04cef4cad4..891b344de8 100644 --- a/examples/with-markdoc/src/pages/index.astro +++ b/examples/with-markdoc/src/pages/index.astro @@ -3,6 +3,9 @@ import { getEntry } from 'astro:content'; import Layout from '../layouts/Layout.astro'; const intro = await getEntry('docs', 'intro'); +if (!intro) { + return Astro.redirect('/404'); +} const { Content } = await intro.render(); ---