Skip to content

Commit 5e91d6b

Browse files
committed
support for param paths
1 parent 561f168 commit 5e91d6b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/middleware/html.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ const html_middleware = async (req, isProd) => {
2222
tempSrc = `${app_path}/index.html`;
2323
}
2424

25+
const paramPage = `${app_path}${paths}/@.html`
2526
src = await exists(tempSrc)
26-
? await Deno.readTextFile(tempSrc)
27-
: `<h1>Error In Page</h1>`;
27+
? await Deno.readTextFile(tempSrc)
28+
: await exists(paramPage) ? await Deno.readTextFile(paramPage) : `<h1>Error In Page</h1>`;
2829

2930
const components = getComponents(src);
3031

0 commit comments

Comments
 (0)