@@ -8,56 +8,50 @@ This is an Astro-based static blog site deployed on GitHub Pages. The blog featu
88
99## Key Commands
1010
11- ### Development
1211``` bash
1312npm run dev # Start dev server at localhost:4321
1413npm run build # Type check and build to ./dist/
1514npm run preview # Preview production build locally
1615npm run format # Format code with Prettier
1716```
1817
19- ### Testing
20- No test suite is currently configured. Type checking is performed during build.
18+ No test suite configured. Type checking runs during build via ` astro check ` .
2119
2220## Architecture & Key Patterns
2321
2422### Content Structure
25- - Blog posts live in ` src/content/post/ ` with filename pattern: ` YYYYMMDD_title.md `
26- - Posts use frontmatter with required fields: title, description, pubDate
27- - Optional fields: updatedDate, heroImage, draft
28- - Draft posts are only visible in development mode
29-
30- ### Dynamic Color System
31- The blog implements a unique visual feature where post title colors change based on age:
32- - Located in ` src/pages/index.astro ` (not PostList.astro)
33- - Uses Color.js and LAB color space for perceptually uniform transitions
34- - Separate color ranges for light (LAB color space) and dark themes
35- - First post date: October 28, 2024 (used as baseline for calculations)
23+ - Blog posts: ` src/content/post/YYYYMMDD_title.md `
24+ - Frontmatter schema defined in ` src/content/config.ts `
25+ - Required: title, description, pubDate
26+ - Optional: updatedDate, heroImage, draft
27+ - Draft posts (` draft: true ` ) only visible in dev mode
28+
29+ ### Dynamic Color System (` src/pages/index.astro ` )
30+ Post titles fade from bright to dark based on age:
31+ - Uses Color.js with LAB color space for perceptual uniformity
32+ - Calculates "staleness" as ratio of post age to time since first post
33+ - First post baseline: October 28, 2024
34+ - Separate color ranges for light/dark themes applied via CSS custom properties
35+
36+ ### Styling
37+ - Tailwind CSS v4 (Vite plugin, no ` @apply ` directive)
38+ - Dark/light theme via CSS custom properties (` --bg ` , ` --text ` , ` --title ` )
39+ - Pretendard font family
40+ - Max content width: ` max-w-2xl ` (640px)
3641
3742### Image Management
3843- Source images: ` src/assets/YYYYMMDD/ `
3944- Public images: ` public/assets/YYYYMMDD/ `
40- - Blog posts reference images from public directory
41-
42- ### Styling
43- - Tailwind CSS v4 with Vite plugin
44- - Custom Pretendard font family
45- - Dark/light theme support via CSS custom properties
46- - Content max-width: 640px (2xl breakpoint)
47-
48- ## Important Configurations
45+ - Posts reference images from ` /assets/YYYYMMDD/ `
4946
50- ### Site Constants (` src/consts.ts ` )
51- - SITE_TITLE: "Fail Fast, Learn Faster"
52- - SITE_DESCRIPTION: "zettalyst.github.io"
47+ ## Deployment
5348
54- ### Build Output
55- - Static files generated to ` dist/ ` directory
56- - Includes sitemap.xml and rss.xml for SEO/syndication
49+ Automatic deployment via GitHub Actions on push to ` main ` :
50+ - Workflow: ` .github/workflows/deploy.yml `
51+ - Uses ` withastro/action@v3 ` for build
52+ - Deploys to GitHub Pages
5753
58- ## Development Notes
54+ ## Generated Files
5955
60- - When adding new posts, maintain the YYYYMMDD filename convention
61- - Images for posts should be added to both src/assets and public/assets directories
62- - The dynamic color system automatically handles new posts without configuration
63- - Draft posts can be created by adding ` draft: true ` to frontmatter
56+ - ` dist/astronomy-sitemap-0.xml ` - Custom sitemap filename
57+ - ` dist/rss.xml ` - RSS feed (generated via ` src/pages/rss.xml.js ` )
0 commit comments