22 lines
429 B
TypeScript
22 lines
429 B
TypeScript
// Entry point for SSG
|
|
import { renderToString } from "react-dom/server";
|
|
import Body from "./Body";
|
|
import Head from "./Head";
|
|
import style from "./style.css?inline";
|
|
|
|
export const render = () => {
|
|
const html =
|
|
"<!doctype html>" +
|
|
renderToString(
|
|
<html lang="en">
|
|
<head>
|
|
<Head />
|
|
<style type="text/css">{style}</style>
|
|
</head>
|
|
<body>
|
|
<Body />
|
|
</body>
|
|
</html>,
|
|
);
|
|
return { html };
|
|
};
|