diff --git a/src/html.tsx b/src/html.tsx index 23609f8..3ee8b3a 100644 --- a/src/html.tsx +++ b/src/html.tsx @@ -4,7 +4,6 @@ * This module is to manage routes for Web API (not render html and images). */ import { Hono } from 'hono'; -import { html, raw } from 'hono/html'; import { Octokit } from '@octokit/rest'; import { fetchContent } from './client'; import { Input } from './components'; @@ -12,7 +11,7 @@ import { parseSlug } from './models'; import type { ZennContent } from './models'; import { parseContentMarkdown } from './parser'; -const app = new Hono(); +const app = new Hono<{ Bindings: CloudflareBindings }>(); app.use(async (c, next) => { c.setRenderer((content) => { return c.html(`${content}`); @@ -103,9 +102,7 @@ app.get('/:slug', async (c) => { try { const md = await fetchContent(octokit, addr); props = parseContentMarkdown(md); - return c.html( - html` - + return c.render(
@@ -116,19 +113,18 @@ app.get('/:slug', async (c) => { /> -