Tech

Astroでブログを作ってCloudflare Pagesで配信する

作ったは良いけど書くことがないし、続く気がしない

Astroを使ってブログを作ってみました。

使った技術

Astro

Astro
Astro builds fast content sites, powerful web applications, dynamic server APIs, and everything in-between.
Astro favicon https://astro.build
Astro

どうせそのうち飽きて更新しなくなるだろうということで、そこまで凝った作りにしなくても良さそうなのと、あまり無料枠とか気にしなくてすみそうな静的コンテンツでのブログ作成をすることを念頭に調査。

他のフレームワークとかと比べてAstroはなんか早いらしい。知らんけど。なんとなく使ってみようと言うことで選定。

Content Collections

Content collections
Manage your content with type safety.
Content collections favicon https://docs.astro.build/ja/guides/content-collections/
Content collections

Markdownなどのコンテンツを、型安全に管理・取得するためのAstroの機能。

Tailwind

Tailwind CSS - Rapidly build modern websites without ever leaving your HTML.
Tailwind CSS is a utility-first CSS framework for rapidly building modern websites without ever leaving your HTML.
Tailwind CSS - Rapidly build modern websites without ever leaving your HTML. favicon https://tailwindcss.com
Tailwind CSS - Rapidly build modern websites without ever leaving your HTML.

ユーティリティファーストなCSSフレームワーク。

自前でCSS書くよりは楽。もっと楽したいならBootstrapとかBulmaとか使った方が良いが自由度は下がる。

Cloudflare Pages

フル スタックアプリケーション
Cloudflare Pagesをは、フロントエンドエンジニア向けフルスタックアプリケーションで、コードを簡単にデプロイできます。試してみませんか?
フル スタックアプリケーション favicon https://www.cloudflare.com/ja-jp/developer-platform/products/pages/
フル スタックアプリケーション

安いという理由でCloudflareで独自ドメインを取っていたので、ついでにホスティングもCloudflareに。

最近はAWSのCloudFrontの定額プラン(無料あり)も出たのでそっちも良かったが、CICDとかはCloudflare Pagesの方が色々と準備されていて楽。