co-authored by
Luca Casonato
parent
2ec980ca45
commit
04a32f3498
@@ -0,0 +1,15 @@
|
||||
/** @jsx h */
|
||||
/** @jsxFrag Fragment */
|
||||
|
||||
import { AppProps, Fragment, h, Head } from "../deps.ts";
|
||||
|
||||
export default function App(props: AppProps) {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<meta name="description" content="Hello world!" />
|
||||
</Head>
|
||||
<props.Component />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import * as $10 from "./pages/_500.tsx";
|
||||
import * as $11 from "./pages/intercept.tsx";
|
||||
import * as $12 from "./pages/_404.tsx";
|
||||
import * as $13 from "./pages/[name].tsx";
|
||||
import * as $14 from "./pages/_app.tsx";
|
||||
|
||||
const routes = {
|
||||
pages: {
|
||||
@@ -33,6 +34,7 @@ const routes = {
|
||||
"./pages/intercept.tsx": $11,
|
||||
"./pages/_404.tsx": $12,
|
||||
"./pages/[name].tsx": $13,
|
||||
"./pages/_app.tsx": $14,
|
||||
},
|
||||
baseUrl: import.meta.url,
|
||||
};
|
||||
|
||||
@@ -24,6 +24,10 @@ Deno.test("/ page prerender", async () => {
|
||||
body,
|
||||
`"data":[["home","Hello!"]]`,
|
||||
);
|
||||
assertStringIncludes(
|
||||
body,
|
||||
`<meta name="description" content="Hello world!" />`,
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test("/props/123 page prerender", async () => {
|
||||
|
||||
Reference in New Issue
Block a user