Skip to content

Commit

Permalink
docs: update readme (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored May 11, 2024
1 parent c437a73 commit 8776ba5
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ createClient()

If you want to add interactions to your page, create Island components. Islands components should be:

- Placed under `app/islands` directory or named with `_` prefix and `island.tsx` suffix like `_componentName.island.tsx`.
- Placed under `app/islands` directory or named with `$` prefix like `$componentName.tsx`.
- It should be exported as a `default` or a proper component name that uses camel case but does not contain `_` and is not all uppercase.

For example, you can write an interactive component such as the following counter:
Expand Down Expand Up @@ -747,7 +747,8 @@ If you want to use Cloudflare's Bindings in your development environment, create

```toml
name = "my-project-name"
compatibility_date = "2023-12-01"
compatibility_date = "2024-04-01"
compatibility_flags = [ "nodejs_compat" ]
pages_build_output_dir = "./dist"
# [vars]
Expand Down Expand Up @@ -782,6 +783,16 @@ Since a HonoX instance is essentially a Hono instance, it can be deployed on any

### Cloudflare Pages

Add the `wrangler.toml`:

```toml
# wrangler.toml
name = "my-project-name"
compatibility_date = "2024-04-01"
compatibility_flags = [ "nodejs_compat" ]
pages_build_output_dir = "./dist"
```

Setup the `vite.config.ts`:

```ts
Expand Down Expand Up @@ -826,7 +837,7 @@ vite build --mode client && vite build
Deploy with the following commands after the build. Ensure you have [Wrangler](https://developers.cloudflare.com/workers/wrangler/) installed:

```txt
wrangler pages deploy ./dist
wrangler pages deploy
```

### SSG - Static Site Generation
Expand Down

0 comments on commit 8776ba5

Please sign in to comment.