diff --git a/README.md b/README.md index 90b510a..5b0d11b 100644 --- a/README.md +++ b/README.md @@ -55,22 +55,23 @@ The `req` JSX prop will be given the `Hono` request: If `_layout.tsx` exists, your pages will automatically be wrapped in it: - export default ({ children, title }: any) => - - - {title ?? 'hype'} - - +```tsx +export default ({ children, title }: any) => ( + + + {title ?? "hype"} + + - - - - -
- {children} -
- - + + + + +
{children}
+ + +) +``` (Files starting with `_` don't get served directly.) @@ -78,18 +79,24 @@ If `_layout.tsx` exists, your pages will automatically be wrapped in it: CSS can be accessed via `/css/main.css`: - +```html + +``` ### js JS can be accessed (and transpiled) via `/js/main.ts` or `/shared/utils.ts`: - +```html + +``` import your modules relatively, for example in `main.ts`: - import { initAbout } from './about' - import utils from './shared/utils' +```typescript +import { initAbout } from "./about" +import utils from "./shared/utils" +``` ### pub @@ -152,5 +159,7 @@ export default app.defaults 4. Enter dev mode - bun install - bun test +```sh +bun install +bun test +```