手順
- Cloudflareアカウントを作る(メール認証まで済ませる)
npm create cloudflare@latest- astroを選ぶ
- blogを選んだ
- そのまま流れで
deployできる
注意点
そのままだとdynamic routing部分がエラーになる(SSGの設定が必要)
post.render is not a function
ビルドすると、以下のwarningが出てる
[WARN] [router] getStaticPaths() ignored in dynamic page /src/pages/blog/[...slug].astro. Add `export const prerender = true;` to prerender the page as static HTML during the build process.
警告通り、src/pages/blog/[...slug].astroに以下を追加
```astro:src/pages/blog/[...slug].astro
- export const prerender = true; import { type Coller ....
ssgすることが明示的になる