import { Hono } from 'hono'; import { jsxRenderer, useRequestContext } from 'hono/jsx-renderer'; import { Page } from '@blog/templates/Page'; import home from '@blog/routes/home'; import posts from '@blog/routes/posts'; import type { SiteMeta } from '@blog/model/SiteMeta'; declare module 'hono' { interface ContextRenderer { (content: string|Promise, props: { meta: SiteMeta }): Response; } } const app = new Hono(); // Render the JSX views app.get( '*', jsxRenderer( ({ children, meta }) => { return ({children}); }, { docType: true } ) ); // read all posts // create listing of posts app.route('/', home); app.route('/posts', posts); export default app;