You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reflect the actual workflow used: compress images with sips before
committing, keep originals in Myself/previous_works, mention the
lightbox, and note GitHub Pages size/bandwidth limits.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
All blog posts live in **`posts/posts.json`**, and all images go in **`posts/images/`**.
4
-
The blog page (`blog.html`) fetches the JSON file at runtime and renders posts newest-first.
3
+
Posts live in **`posts/posts.json`**. Images live in **`posts/images/`**.
4
+
`blog.html` fetches the JSON at runtime and renders posts **newest-first** (sorted by `date`).
5
+
Clicking any image opens a fullscreen lightbox (← / → / Esc).
6
+
7
+
---
8
+
9
+
## Where things live
10
+
11
+
```
12
+
WEBSITE/ ← git repo (yahyunee.github.io)
13
+
├── blog.html, blog.js, styles.css
14
+
└── posts/
15
+
├── posts.json ← edit this to add posts
16
+
├── images/ ← put compressed photos here
17
+
│ └── alcf-hackathon-2026-1.jpeg
18
+
└── README.md ← you are here
19
+
20
+
Myself/previous_works/conferences/... ← NOT in the git repo
21
+
└── 2604_ALCF_GPU_Hackathon/images/... ← keep originals here
22
+
```
23
+
24
+
**Rule:** Originals (large camera files) stay in `Myself/previous_works/...`. Only **compressed copies** go into `posts/images/`. This keeps the repo small and the site fast.
5
25
6
26
---
7
27
@@ -11,91 +31,85 @@ Each post in `posts.json` is one object inside the top-level array:
11
31
12
32
```json
13
33
{
14
-
"id": "unique-slug", // unique identifier in kebab-case (used for the URL anchor #post-<id>)
15
-
"title": "Post title", // shown as the heading
16
-
"date": "YYYY-MM-DD", // used for sorting (newest first) and displayed under the title
17
-
"location": "Optional place", // shown after the date (omit or use "" if not applicable)
18
-
"description": "Short paragraph...", // 1–4 sentences, plain text (HTML is escaped for safety)
19
-
"images": ["images/file1.jpg", ...] // paths relative to /posts/, can be empty []
34
+
"id": "unique-slug", // kebab-case, used for URL anchor #post-<id>
35
+
"title": "Post title", // heading
36
+
"date": "YYYY-MM-DD", // controls sort order (newest first)
37
+
"location": "Optional place", // shown after date; omit or "" if N/A
38
+
"description": "1-4 sentence paragraph",
39
+
"images": ["images/file1.jpg", ...] // relative to /posts/, [] if none
20
40
}
21
41
```
22
42
23
-
Image gallery layout adapts automatically:
24
-
- 1 image → full-width
25
-
- 2 images → side by side
26
-
- 3+ images → responsive grid (min 200px per cell)
43
+
Gallery layout adapts automatically: 1 → full width, 2 → side by side, 3+ → responsive grid.
27
44
28
45
---
29
46
30
-
## Step-by-step: add a new post
47
+
## Workflow (the steps Claude follows)
31
48
32
-
### 1. Drop your photos into `posts/images/`
49
+
### 1. Gather the source material
33
50
34
-
Use lowercase, kebab-case filenames like `alcf-2026-1.jpg`. Compress large photos (~1500px max width is plenty).
51
+
Find the event folder under `Myself/previous_works/conferences/` (or wherever the originals live). Skim any program PDFs or slides for accurate **dates, location, and team name** — don't guess.
35
52
36
-
```
37
-
posts/
38
-
├── images/
39
-
│ ├── alcf-2026-1.jpg ← your new photos
40
-
│ └── alcf-2026-2.jpg
41
-
├── posts.json
42
-
└── README.md
53
+
### 2. Pick photos and compress them
54
+
55
+
Camera JPEGs are typically 4000+ px wide and 5-8 MB each. Resize to **max 1600 px wide at quality ~80** before committing. From `posts/images/`:
56
+
57
+
```bash
58
+
# resize in place (originals are safe in Myself/previous_works/)
Target: **under ~500 KB per image**. Use lowercase kebab-case filenames tied to the event, e.g. `alcf-hackathon-2026-1-group.jpeg`.
46
63
47
-
Open `posts/posts.json` and add a new object at the **top of the array** (order doesn't matter for display since posts are sorted by date, but newest-on-top is easier to read in the file).
64
+
### 3. Add the entry to `posts.json`
48
65
49
-
```json
50
-
[
51
-
{
52
-
"id": "alcf-hackathon-2026",
53
-
"title": "ALCF GPU Hackathon",
54
-
"date": "2026-04-15",
55
-
"location": "Argonne National Laboratory",
56
-
"description": "Spent the week scaling up our foundation model training on Polaris GPUs. Learned a ton about distributed training and met amazing researchers from across the country.",
GitHub Pages redeploys within~1 minute. Refresh `blog.html` to see the post.
84
+
GitHub Pages redeploys in~1 minute.
82
85
83
86
---
84
87
85
-
## Easiest way: just ask Claude
86
-
87
-
If editing JSON by hand is annoying, just tell Claude in chat:
88
+
## Just ask Claude
88
89
89
-
> "Add a blog post titled 'ALCF GPU Hackathon', date 2026-04-15, location Argonne National Laboratory. Description: spent the week scaling foundation model training on Polaris GPUs. Here are the photos: \[attach images or give paths\]."
90
+
> "Add a blog post for the ALCF GPU Hackathon — photos are in `Myself/previous_works/conferences/2604_ALCF_GPU_Hackathon/`."
90
91
91
92
Claude will:
92
-
1.Save the images to `posts/images/` with sensible filenames
93
-
2.Append the entry to `posts.json`
94
-
3.Validate the JSON
93
+
1.Look up dates/location/team from the source folder
94
+
2.Pick photos, **compress them with `sips`**, copy into `posts/images/` with sensible filenames
95
+
3.Append the entry to `posts.json` and validate
95
96
4. Commit and push
96
97
97
98
---
98
99
99
-
## Removing or editing a post
100
+
## Editing or deleting a post
101
+
102
+
Open `posts.json` and edit/delete the object. Also delete unused images from `posts/images/`. Commit and push.
103
+
104
+
---
105
+
106
+
## Size and bandwidth limits (FYI)
107
+
108
+
| Limit | Threshold |
109
+
|---|---|
110
+
| Single file | 100 MB hard reject; 50 MB warning |
0 commit comments