Skip to content

Commit 722e12e

Browse files
committed
doc: update README
1 parent 41f2876 commit 722e12e

1 file changed

Lines changed: 16 additions & 67 deletions

File tree

README.md

Lines changed: 16 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# cheeyi.me
22

3-
My personal website and blog, built with [Astro](https://astro.build). Previously built with Jekyll, migrated to Astro in November 2025 for better performance and modern tooling.
3+
My personal website and blog, built with [Astro](https://astro.build). Previously built with Jekyll, [migrated to Astro in November 2025](https://cheeyi.me/blog/migrating-to-astro/) for better performance and modern tooling.
44

55
## 🚨 Prerequisites
66

@@ -37,11 +37,13 @@ The dev server runs at **http://localhost:4321/**
3737

3838
### Step-by-Step Guide
3939

40-
1. **Create a new markdown file** in `src/content/blog/`:
40+
1. **Create a new file** in `src/content/blog/`:
41+
- Use `.md` for standard posts.
42+
- Use `.mdx` if you need to use components (like `<GithubRepoCard />`) inside the post.
4143

4244
```bash
43-
# Example: src/content/blog/my-new-post.md
44-
touch src/content/blog/my-new-post.md
45+
# Example
46+
touch src/content/blog/my-new-post.mdx
4547
```
4648

4749
2. **Add front matter** at the top:
@@ -50,36 +52,25 @@ touch src/content/blog/my-new-post.md
5052
---
5153
title: "Your Post Title"
5254
pubDate: 2025-11-20T12:00:00+08:00
53-
categories: notes # or "random"
55+
categories: tech # or "random"
5456
description: "A brief description for SEO"
5557
---
5658

5759
Your post content starts here...
5860
```
5961

60-
3. **Write content** using Markdown:
62+
3. **Write content** using Markdown/MDX:
6163
- Code blocks with syntax highlighting
62-
- Images: `![Alt text](/assets/images/your-image.jpg)`
64+
- Images: `![Alt text](../../assets/my-image.jpg)` (Relative path to `src/assets` allows Astro to optimize images)
6365
- Links: `[text](url)`
6466

65-
4. **Add images** (if needed):
66-
- Place in `public/assets/images/`
67-
- Or organize in subdirectories: `public/assets/images/post-name/`
68-
69-
5. **Test locally**:
70-
71-
```bash
72-
npm run dev
73-
# Visit http://localhost:4321/blog/my-new-post/
74-
```
75-
7667
### Example Blog Post
7768

7869
```markdown
7970
---
8071
title: "Building a Modern Web App"
8172
pubDate: 2025-11-20T14:30:00+08:00
82-
categories: notes
73+
categories: tech
8374
description: "My experience building a web app with Astro and TypeScript."
8475
---
8576

@@ -95,16 +86,14 @@ const greet = (name: string) => {
9586
};
9687
```\`
9788
98-
![My screenshot](/assets/images/screenshot.png)
99-
100-
Check out [Astro](https://astro.build) for more info!
89+
![My screenshot](../../assets/screenshot.png)
10190
```
10291

10392
## 🚀 Deployment
10493

10594
### Automatic Deployment
10695

107-
This site **automatically deploys** to GitHub Pages when you push to `main`:
96+
This site **automatically deploys** to GitHub Pages when pushed to `main`:
10897

10998
```bash
11099
git add .
@@ -123,52 +112,12 @@ git push origin main
123112
- Source: **GitHub Actions**
124113
- Custom domain: **cheeyi.me** (configured via CNAME file)
125114

126-
## 📁 Project Structure
127-
128-
```text
129-
├── .github/
130-
│ └── workflows/
131-
│ └── deploy.yml # GitHub Actions deployment
132-
├── public/
133-
│ ├── favicon.svg
134-
│ └── assets/ # Static files
135-
│ ├── images/ # Blog images
136-
│ ├── docs/ # PDFs (resume)
137-
│ └── css/ # Custom CSS
138-
├── src/
139-
│ ├── components/ # Reusable components
140-
│ │ ├── Header.astro
141-
│ │ ├── Footer.astro
142-
│ │ └── ...
143-
│ ├── content/
144-
│ │ └── blog/ # 📝 Blog posts go here
145-
│ │ ├── hello-world.md
146-
│ │ ├── endianness-ios.md
147-
│ │ └── ...
148-
│ ├── layouts/
149-
│ │ └── BlogPost.astro # Post template
150-
│ ├── pages/
151-
│ │ ├── index.astro # Home page
152-
│ │ ├── about.astro # About page
153-
│ │ ├── resume.astro # Resume
154-
│ │ ├── blog/ # Blog listing
155-
│ │ └── rss.xml.js # RSS feed
156-
│ ├── styles/ # Global CSS
157-
│ ├── consts.ts # Site config
158-
│ └── content.config.ts # Content schema
159-
├── astro.config.mjs # Astro config
160-
├── package.json
161-
├── tsconfig.json
162-
├── CNAME # Custom domain
163-
└── README.md # This file
164-
```
165-
166115
## 🛠 Tech Stack
167116

168-
- **Framework**: [Astro](https://astro.build) v5.15.9
117+
- **Framework**: [Astro](https://astro.build)
169118
- **Language**: TypeScript
170119
- **Styling**: CSS with custom properties
171-
- **Syntax Highlighting**: [Shiki](https://shiki.matsu.io/) (github-light theme)
120+
- **Syntax Highlighting**: [Shiki](https://shiki.matsu.io/)
172121
- **Deployment**: GitHub Pages via GitHub Actions
173122
- **Package Manager**: npm
174123
- **Node Version**: 20+
@@ -185,11 +134,11 @@ git push origin main
185134

186135
## 📊 Features
187136

188-
-**5 Blog Posts** with syntax highlighting
137+
-**Blog** with syntax highlighting and MDX support
189138
-**RSS Feed** at `/rss.xml`
190139
-**Sitemap** automatically generated
191140
-**SEO Optimized** with meta tags
192-
-**Fast Performance** (sub-second page loads)
141+
-**Fast Performance** (Zero JS by default)
193142
-**Mobile Responsive** design
194143
-**TypeScript** for type safety
195144
-**Automatic Deployments** via GitHub Actions

0 commit comments

Comments
 (0)