ZeroZawa で始めるブログ作成
このガイドでは、ZeroZawa ブログテンプレートを使って最初のブログを作成する方法を説明します。
1. プロジェクトのセットアップ
まず、以下のコマンドでプロジェクトを作成します:
npm create astro@latest -- --template minimal2. 依存関係のインストール
必要なパッケージをインストールします:
npm install @astrojs/tailwind @astrojs/mdx3. 設定ファイルの編集
astro.config.mjsを編集して、必要な統合を追加します:
import { defineConfig } from 'astro/config'import tailwind from '@astrojs/tailwind'import mdx from '@astrojs/mdx'
export default defineConfig({ integrations: [tailwind(), mdx()],})4. 最初の記事を書く
src/content/posts/ディレクトリに新しいマークダウンファイルを作成します:
---title: My First Postdescription: This is my first blog postpubDate: 2024-03-10---
# Hello, World!5. ブログの確認
開発サーバーを起動して、ブログを確認します:
npm run devこれで、基本的なブログの設定は完了です!
