1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# CLAUDE.md
## Project Overview
Personal website and blog for Dawid Rycerz (rycerz.xyz). Built with Astro 5, featuring DevOps/web development blog posts, Pleroma microblog integration, full-text search, and dynamic OG image generation. Based on the Astro Cactus theme.
## Commands
```bash
pnpm dev # Start dev server
pnpm build # Build to ./dist/
pnpm postbuild # Generate Pagefind search index
pnpm preview # Preview built site
pnpm deploy # Build + deploy to Cloudflare Pages
pnpm lint # Biome linting
pnpm format # Full formatting (Biome + Prettier + imports)
pnpm check # Astro type checking
```
## Architecture
- **Framework:** Astro 5 (static site generator) with TypeScript (strictest mode)
- **Styling:** TailwindCSS 4 with Typography plugin
- **Content:** Markdown/MDX blog posts in `src/content/post/`, tags in `src/content/tag/`
- **Pleroma loader:** Custom content loader fetching posts from `social.craftknight.com` (`src/loaders/pleroma.ts`)
- **Custom plugins:** Remark admonitions (`src/plugins/remark-admonitions.ts`), Rehype image captions (`src/plugins/rehype-image-captions.ts`)
- **OG images:** Generated dynamically with Satori + Sharp (`src/pages/og-image/`)
- **Search:** Pagefind (indexed at postbuild)
- **Package manager:** pnpm
### Key directories
```
src/
├── components/ # Astro components (layout/, blog/)
├── content/ # Content collections (post/, tag/, pleroma)
├── data/ # Static data files
├── i18n/ # Internationalization
├── layouts/ # Page layouts (Base, BlogPost)
├── loaders/ # Custom content loaders
├── pages/ # Routes and dynamic pages
├── plugins/ # Remark/Rehype plugins
├── styles/ # Global styles
├── utils/ # Utility functions
├── content.config.ts # Content collection schemas
└── site.config.ts # Site-wide configuration
```
### Key config files
- `astro.config.ts` - Astro configuration, integrations, markdown plugins
- `biome.json` - Linter/formatter (2-space indent, 100 char width, tabs)
- `tailwind.config.ts` - TailwindCSS with custom prose styling
- `tsconfig.json` - Strict TypeScript, `@/*` path alias to `src/*`
## Conventions
- TypeScript strict mode throughout
- Formatting: tabs, 100 char line width, trailing commas (Biome + Prettier)
- Path alias: `@/*` maps to `src/*`
- Astro components use `.astro` extension
- Blog posts use Markdown/MDX with YAML frontmatter
- Pre-commit hooks via Husky
## Commit Rules
**IMPORTANT:** Before completing any task, you MUST run `/commit` to commit your changes.
- Only commit files YOU modified in this session - never commit unrelated changes
- Use atomic commits with descriptive messages
- If there are no changes to commit, skip this step
- Do not push unless explicitly asked
|