- Add 'Recommended Development Setup' section highlighting Podman as the recommended development approach - Organize Commands section into two subsections: 'Local Development (with Podman)' and 'Direct Commands (without Podman)' - Include examples for podman compose commands (up --build, up -d, exec) - Reference README.md for detailed container setup instructions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2.9 KiB
2.9 KiB
Copilot Instructions for n-daisuke897-blog
Project Overview
This is a personal blog named "Naputo" built with Astro and Preact. The blog is designed to publish articles and content with a modern static site generation approach.
Repository: https://git.n-daisuke897.com/nakada0907/n-daisuke897-blog
Tech Stack
- Framework: Astro 5.x
- UI Library: Preact 10.x for interactive components
- Language: TypeScript
- Build Tool: Astro CLI
- RSS: @astrojs/rss for RSS feed generation
- Linting: ESLint with TypeScript and Astro plugins
Project Structure
src/: Source codepages/: Astro pages (routing based on file structure)layouts/: Layout componentscomponents/: Reusable componentsblog/: Blog contentstyles/: Global stylesscripts/: Utility scriptscontent.config.ts: Content collection configuration
public/: Static assets (images, fonts, etc.)dist/: Build output directorybuildspec.yml: AWS CodeBuild configuration
Development Guidelines
Recommended Development Setup
Development via Podman (Recommended): This repository is designed to be developed inside a Podman container for consistency and reproducibility. See README.md for complete container setup instructions.
- Run
podman compose up --buildto start development - Run commands in the container with
podman compose exec app <command> - This keeps your host environment clean and ensures reproducible builds
Commands
Local Development (with Podman - Recommended)
podman compose up --build: Start development container with auto-rebuildpodman compose up -d: Start development container in backgroundpodman compose exec app npm run dev: Start dev server inside containerpodman compose exec app npm run build: Build inside container
Direct Commands (without Podman)
npm install: Install dependenciesnpm run dev: Start local development server atlocalhost:4321npm run build: Build production site to./dist/npm run preview: Preview production build locallynpm run astro: Run Astro CLI commands
Coding Standards
- Use TypeScript for all new code
- Follow the ESLint configuration provided
- Use Preact components for interactive UI elements
- Keep components modular and reusable
- Use Astro's component syntax for static content
File Naming
- Use kebab-case for file names
- Use PascalCase for component names
- Use
.astroextension for Astro components - Use
.tsxextension for Preact components
Best Practices
- Prefer static generation over client-side rendering when possible
- Use Astro's content collections for blog posts
- Optimize images and assets before adding to
public/ - Keep bundle size minimal - Astro ships zero JS by default
- Use Preact only when client interactivity is needed
Deployment
This project uses AWS CodeBuild for deployment (see buildspec.yml).