From c80c7f677c8ba42efdbd399fd5bf9cf3c191856f Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Tue, 4 Jan 2022 09:10:27 -0800 Subject: [PATCH] Rename [slug].astro to [...slug].astro (#2306) --- docs/src/pages/{[slug].astro => [...slug].astro} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename docs/src/pages/{[slug].astro => [...slug].astro} (86%) diff --git a/docs/src/pages/[slug].astro b/docs/src/pages/[...slug].astro similarity index 86% rename from docs/src/pages/[slug].astro rename to docs/src/pages/[...slug].astro index 7c08ff2685..613e2b3d5f 100644 --- a/docs/src/pages/[slug].astro +++ b/docs/src/pages/[...slug].astro @@ -1,11 +1,10 @@ --- export async function getStaticPaths() { // get english pages that moved from `/` to `/en/` - const englishPages = Astro.fetchContent('./en/**.md'); + const englishPages = Astro.fetchContent('./en/**/*.md'); // add pages that are `*.astro` files as well const otherPages = [{ url: "/en/themes" }]; - return [...englishPages, ...otherPages].map((page) => ({ params: { slug: page.url.slice(4), @@ -17,4 +16,4 @@ export async function getStaticPaths() { } --- - \ No newline at end of file +