Refactor to TypeScript ES modules and add metadata sidebar

This commit is contained in:
Alan Grainger
2026-06-04 07:40:52 +12:00
parent d86c8721cc
commit e43b57d644
49 changed files with 5909 additions and 2409 deletions
+10
View File
@@ -0,0 +1,10 @@
import { renderToString } from 'preact-render-to-string'
import { VNode } from 'preact'
/**
* Render a JSX component to a complete HTML response string.
* Prepends the doctype so the result is a valid HTML5 document.
*/
export function renderPage (component: VNode): string {
return '<!DOCTYPE html>' + renderToString(component)
}