n-daisuke897-blog/.github/copilot-instructions.md
Daisuke 6267fb5d79 docs: Add Podman development recommendations to Copilot instructions
- 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>
2026-03-01 17:36:10 +09:00

75 lines
2.9 KiB
Markdown

# 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 code
- `pages/`: Astro pages (routing based on file structure)
- `layouts/`: Layout components
- `components/`: Reusable components
- `blog/`: Blog content
- `styles/`: Global styles
- `scripts/`: Utility scripts
- `content.config.ts`: Content collection configuration
- `public/`: Static assets (images, fonts, etc.)
- `dist/`: Build output directory
- `buildspec.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 --build` to 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-rebuild
- `podman compose up -d`: Start development container in background
- `podman compose exec app npm run dev`: Start dev server inside container
- `podman compose exec app npm run build`: Build inside container
#### Direct Commands (without Podman)
- `npm install`: Install dependencies
- `npm run dev`: Start local development server at `localhost:4321`
- `npm run build`: Build production site to `./dist/`
- `npm run preview`: Preview production build locally
- `npm 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 `.astro` extension for Astro components
- Use `.tsx` extension 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`).