fix: display error messages if building on dev without index page
This commit is contained in:
parent
a1c076305d
commit
fbc8124646
@ -36,12 +36,6 @@ const { showSidebarButton = true } = Astro.props;
|
|||||||
>
|
>
|
||||||
Standard Library
|
Standard Library
|
||||||
</a>
|
</a>
|
||||||
<a
|
|
||||||
href="/api/help/"
|
|
||||||
class="hidden sm:inline-block px-4 font-display font-bold-text-xl hover:underline"
|
|
||||||
>
|
|
||||||
Help
|
|
||||||
</a>
|
|
||||||
<a
|
<a
|
||||||
href="/spec/"
|
href="/spec/"
|
||||||
class="hidden sm:inline-block px-4 font-display font-bold-text-xl hover:underline"
|
class="hidden sm:inline-block px-4 font-display font-bold-text-xl hover:underline"
|
||||||
|
@ -92,7 +92,11 @@ for (const levels_key in second_level) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const index_page = entries.find(post => post.relative_file === "/index.md" || post.relative_file === "/index.mdx");
|
const index_page = entries.find(post => post.relative_file === "/index.md" || post.relative_file === "/index.mdx");
|
||||||
const basePath = index_page.url;
|
if (index_page === undefined && process.env.NODE_ENV !== "production") {
|
||||||
|
console.error("\n\nBuilding without an index page");
|
||||||
|
console.error("Props base_dir:", base_dir);
|
||||||
|
}
|
||||||
|
const basePath = index_page?.url ?? "/";
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout title={frontmatter.title}>
|
<BaseLayout title={frontmatter.title}>
|
||||||
|
Loading…
Reference in New Issue
Block a user