make routing fixes from discord feedback (#1091)
This commit is contained in:
parent
34e9ab8b10
commit
dcb97b0223
5 changed files with 448 additions and 443 deletions
|
@ -91,7 +91,7 @@
|
|||
"semver": "^7.3.5",
|
||||
"shorthash": "^0.0.2",
|
||||
"slash": "^4.0.0",
|
||||
"snowpack": "^3.8.3",
|
||||
"snowpack": "^3.8.6",
|
||||
"string-width": "^5.0.0",
|
||||
"supports-esm": "^1.0.0",
|
||||
"tiny-glob": "^0.2.8",
|
||||
|
|
|
@ -32,12 +32,12 @@ export async function getStaticPathsForPage({
|
|||
const mod = await snowpackRuntime.importModule(location.snowpackURL);
|
||||
validateGetStaticPathsModule(mod);
|
||||
const [rssFunction, rssResult] = generateRssFunction(astroConfig.buildOptions.site, route);
|
||||
const staticPaths: GetStaticPathsResult = await mod.exports
|
||||
.getStaticPaths({
|
||||
const staticPaths: GetStaticPathsResult = (
|
||||
await mod.exports.getStaticPaths({
|
||||
paginate: generatePaginateFunction(route),
|
||||
rss: rssFunction,
|
||||
})
|
||||
.flat();
|
||||
).flat();
|
||||
validateGetStaticPathsResult(staticPaths, logging);
|
||||
return {
|
||||
paths: staticPaths.map((staticPath) => staticPath.params && route.generate(staticPath.params)).filter(Boolean),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
export function getStaticPaths({paginate}) {
|
||||
export async function getStaticPaths({paginate}) {
|
||||
const data = Astro.fetchContent('../../post/*.md');
|
||||
return paginate(data, {pageSize: 1});
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
export function getStaticPaths({paginate}) {
|
||||
export async function getStaticPaths({paginate}) {
|
||||
const data = Astro.fetchContent('../../post/*.md');
|
||||
return paginate(data, {pageSize: 1});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue