Skip to content

Commit 892be30

Browse files
authored
Merge branch 'main' into feature/sponsor-page
2 parents 8507a28 + 9adc786 commit 892be30

252 files changed

Lines changed: 555 additions & 110930 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ensure consistent line endings
2+
* text=auto
3+
4+
# Scripts must use LF
5+
*.py text eol=lf
6+
*.sh text eol=lf

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.14

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Weekly Dev Chat website — MkDocs Material static site. Read `mkdocs.yml` and r
77
- Posts are for Tuesdays (the weekly chat day). Use next Tuesday's date unless told otherwise.
88
- End post body with this paragraph (before the image):
99
`Everyone and anyone is welcome to [join](https://weeklydevchat.com/join/) as long as you are kind, supportive, and respectful of others. Zoom link will be posted at 12pm MDT.`
10-
- Place images in the same directory as the post's `index.md`.
10+
- Place images in the same directory as the post's `index.md`. Run `python3 scripts/optimize_image.py <image>` to convert to WebP and resize for the web.
1111
- Use `./create_post.sh` to scaffold a new post (calculates next Tuesday automatically).
1212
- **Multiple posts on the same date:** If a date folder already has an `index.md`, prefix the filename with a number and dash (e.g., `0-index.md`). The newest/latest post should use the lowest number so it appears first on the homepage. The original `index.md` keeps its name.
1313

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,43 @@ These scripts will:
118118

119119
4. Add any images to the same directory as the post
120120

121+
5. **Optimize images** for the web before committing (see [Optimizing Images](#optimizing-images) below)
122+
123+
### Optimizing Images
124+
125+
After adding an image to a post, run the optimization script to convert it to WebP and resize it for the web:
126+
127+
```bash
128+
python3 scripts/optimize_image.py docs/posts/YYYY/MM/DD/your_image.png
129+
```
130+
131+
This will create an optimized `.webp` file alongside the original. Update your post's markdown to reference the new `.webp` file, then delete the original if no longer needed.
132+
133+
**Options:**
134+
135+
| Flag | Default | Description |
136+
|------|---------|-------------|
137+
| `--quality` | 80 | WebP quality (1–100) |
138+
| `--max-width` | 1200 | Max width in pixels (won't upscale) |
139+
140+
**Examples:**
141+
142+
```bash
143+
# Optimize a single image with defaults
144+
python3 scripts/optimize_image.py docs/posts/2026/04/14/photo.png
145+
146+
# Batch optimize multiple images
147+
python3 scripts/optimize_image.py docs/posts/2026/04/14/*.png docs/posts/2026/04/14/*.jpg
148+
149+
# Custom quality and max width
150+
python3 scripts/optimize_image.py --quality 90 --max-width 1600 image.jpeg
151+
```
152+
153+
> **Note:** This script requires [Pillow](https://pillow.readthedocs.io/). Install dev dependencies with:
154+
> ```bash
155+
> pip install -r requirements-dev.txt
156+
> ```
157+
121158
### Categories and Tags
122159
123160
Categories are broad topic groupings and tags are specific topic labels for filtering. **Please use existing categories and tags when possible** to keep the taxonomy consistent. New ones can be added when truly needed.
@@ -149,8 +186,12 @@ Sponsor and donor entries live in [`data/sponsors.yml`](data/sponsors.yml), whic
149186
├── docker-compose.yml # Docker development environment
150187
├── create_post.sh # Bash script to create blog posts
151188
├── create_post.ps1 # PowerShell script to create blog posts
189+
├── requirements-dev.in # Dev-only dependency pins (e.g. Pillow)
190+
├── requirements-dev.txt # Compiled dev dependencies
152191
├── scripts/
153-
│ └── find_tags_categories.py # List all existing tags and categories
192+
│ |── find_tags_categories.py # List all existing tags and categories
193+
│ |── find_tags_categories.py # List all existing tags and categories
194+
│ └── optimize_image.py # Optimize images for the web (PNG/JPEG → WebP)
154195
├── data/
155196
│ └── sponsors.yml # Sponsor & donor data (consumed by macros plugin)
156197
├── .github/
@@ -183,6 +224,9 @@ mkdocs serve -a 0.0.0.0:8000 # Start server accessible on network
183224
mkdocs build # Build static site to site/ directory
184225
mkdocs build --clean # Clean build
185226

227+
# Optimize an image for the web
228+
python3 scripts/optimize_image.py docs/posts/YYYY/MM/DD/image.png
229+
186230
# Help
187231
mkdocs -h # Show help
188232

docs/.authors.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ authors:
22
chris:
33
name: Chris Cumming
44
description: Host
5-
avatar: https://weeklydevchat.com/hosts/chris.jpeg
5+
avatar: /hosts/chris.webp
66
norm:
77
name: Norman Lorrain
88
description: Host
9-
avatar: https://weeklydevchat.com/hosts/norm.png
9+
avatar: /hosts/norm.webp
1010
omar:
1111
name: Omar Ashour
1212
description: Host
13-
avatar: https://weeklydevchat.com/hosts/omar.png
13+
avatar: /hosts/omar.webp
-1.42 MB
Binary file not shown.
-166 KB
Binary file not shown.
-136 KB
Binary file not shown.

docs/assets/Design Files/weekly_chat.ai

Lines changed: 0 additions & 110800 deletions
This file was deleted.
-70.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)