/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-integration-with-ht-29e7214ebd38-integration-with-html-middleware-s0027-c0000.md

Integration with html Middleware - hono-docs

Integration with html Middleware Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt integration with...

Integration with html Middleware

Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#integration-with-html-middleware

Summary

Combine the JSX and HTML middlewares for powerful templating. For in-depth details, consult the HTML middleware documentation. ```tsx import { Hono } from 'hono' import { html } from 'hono/html' const app = new Hono...

Content

Combine the JSX and HTML middlewares for powerful templating. For in-depth details, consult the HTML middleware documentation.

import { Hono } from 'hono'
import { html } from 'hono/html'

const app = new Hono()

interface SiteData {
  title: string
  children?: any
}

const Layout = (props: SiteData) =>
  html`<!doctype html>
    <html>
      <head>
        <title>${props.title}</title>
      </head>
      <body>
        ${props.children}
      </body>
    </html>`

const Content = (props: { siteData: SiteData; name: string }) => (
  <Layout {...props.siteData}>
    <h1>Hello {props.name}</h1>
  </Layout>
)

app.get('/:name', (c) => {
  const { name } = c.req.param()
  const props = {
    name: name,
    siteData: {
      title: 'JSX with html sample',
    },
  }
  return c.html(<Content {...props} />)
})

export default app
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-integration-with-ht-29e7214ebd38-integration-with-html-middleware-s0027-c0000.md
kind
directory
role
markdown_note
children
0

Metadata

created_at
virtual
updated_at
virtual
etag
virtual
metadata_json
{}

Lint Hints

No lightweight warnings.

Outgoing Links

No outgoing links indexed.

Incoming Links

Select a file node to inspect backlinks.

Raw Source

No raw source path inferred.