[ci] yarn format
This commit is contained in:
parent
40c882a253
commit
3153306953
2 changed files with 5 additions and 2 deletions
|
@ -91,7 +91,10 @@ export async function buildCollectionPage({ astroConfig, filepath, runtime, site
|
|||
/** Build static page */
|
||||
export async function buildStaticPage({ astroConfig, buildState, filepath, runtime }: PageBuildOptions): Promise<void> {
|
||||
const { pages: pagesRoot } = astroConfig;
|
||||
const url = filepath.pathname.replace(pagesRoot.pathname, '/').replace(/.(astro|md)$/, '').replace(/\/index$/, '/');
|
||||
const url = filepath.pathname
|
||||
.replace(pagesRoot.pathname, '/')
|
||||
.replace(/.(astro|md)$/, '')
|
||||
.replace(/\/index$/, '/');
|
||||
const result = await runtime.load(url);
|
||||
if (result.statusCode !== 200) {
|
||||
let err = (result as any).error;
|
||||
|
|
|
@ -12,7 +12,7 @@ Pages('Can find page with "index" at the end file name', async ({ build, runtime
|
|||
await build().catch((err) => {
|
||||
assert.ok(!err, 'Error during the build');
|
||||
});
|
||||
|
||||
|
||||
const result = await runtime.load('posts/name-with-index');
|
||||
if (result.error) throw new Error(result.error);
|
||||
|
||||
|
|
Loading…
Reference in a new issue