Skip to content

Commit

Permalink
chore: update examples (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored Feb 6, 2024
1 parent dce8b78 commit 9fef9aa
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 37 deletions.
Binary file modified examples/basic/bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dev": "vite",
"build": "vite build --mode client && vite build",
"preview": "wrangler pages dev ./dist",
"deploy": "$npm_execpath build && wrangler pages deploy ./dist"
"deploy": "$npm_execpath run build && wrangler pages deploy ./dist"
},
"private": true,
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions examples/mdx/app/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable-next-line node/no-extraneous-import
import 'hono'
import {} from 'hono'
import type { Meta } from './types'

declare module 'hono' {
Expand Down
55 changes: 25 additions & 30 deletions examples/mdx/app/routes/_renderer.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
import { jsxRenderer } from 'hono/jsx-renderer'

export default jsxRenderer(
({ children, title, frontmatter }) => {
return (
<html lang='en'>
<head>
<meta charset='UTF-8' />
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
{<title>{title ?? frontmatter?.title ?? 'My Blog'}</title>}
<link rel='stylesheet' href='/static/style.css' />
</head>
<body>
<header>
<h1>
<a href='/'>My Blog</a>
</h1>
</header>
<main>
<article>{children}</article>
</main>
<footer>
<p>&copy; 2024 My Blog. All rights reserved.</p>
</footer>
</body>
</html>
)
},
{
docType: true,
}
)
export default jsxRenderer(({ children, title, frontmatter }) => {
return (
<html lang='en'>
<head>
<meta charset='UTF-8' />
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
{<title>{title ?? frontmatter?.title ?? 'My Blog'}</title>}
<link rel='stylesheet' href='/static/style.css' />
</head>
<body>
<header>
<h1>
<a href='/'>My Blog</a>
</h1>
</header>
<main>
<article>{children}</article>
</main>
<footer>
<p>&copy; 2024 My Blog. All rights reserved.</p>
</footer>
</body>
</html>
)
})
Binary file modified examples/mdx/bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions examples/mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dev": "vite",
"build": "vite build",
"preview": "wrangler pages dev ./dist",
"deploy": "$npm_execpath build && wrangler pages deploy ./dist"
"deploy": "$npm_execpath run build && wrangler pages deploy ./dist"
},
"private": true,
"devDependencies": {
Expand All @@ -17,6 +17,6 @@
"wrangler": "^3.23.0"
},
"dependencies": {
"hono": "4.0.0-rc.3"
"hono": "4.0.0-rc.4"
}
}
2 changes: 0 additions & 2 deletions examples/mdx/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import devServer from '@hono/vite-dev-server'
import ssg from '@hono/vite-ssg'
import mdx from '@mdx-js/rollup'
import honox from 'honox/vite'
Expand All @@ -12,7 +11,6 @@ export default defineConfig(() => {
return {
plugins: [
honox(),
devServer({ entry }),
ssg({ entry }),
mdx({
jsxImportSource: 'hono/jsx',
Expand Down

0 comments on commit 9fef9aa

Please sign in to comment.