mirror of
https://github.com/withastro/astro.git
synced 2025-01-23 02:51:53 -05:00
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),
|
Loading…
Reference in a new issue