Rename [slug].astro to [...slug].astro (#2306)
This commit is contained in:
parent
e5019271a5
commit
c80c7f677c
1 changed files with 2 additions and 3 deletions
|
@ -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() {
|
|||
}
|
||||
---
|
||||
|
||||
<meta http-equiv="refresh" content={`0;url=${Astro.props.englishSlug}`} />
|
||||
<meta http-equiv="refresh" content={`0;url=${Astro.props.englishSlug}`} />
|
Loading…
Reference in a new issue