Skip to content

Commit 1f91527

Browse files
author
Jacques de Vos
committed
Add agent skills for local setup and publishing posts.
Ignore screenshot artifacts and bump Bundler lock metadata so gems install cleanly on modern Ruby.
1 parent 28a654f commit 1f91527

4 files changed

Lines changed: 140 additions & 1 deletion

File tree

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
name: publish-blog
3+
description: >-
4+
Wires supplied content into a Jekyll post (_posts file, front matter, assets,
5+
optional includes) and previews it locally. Use when publishing or updating
6+
post packaging — not when writing the article or talk content itself.
7+
---
8+
9+
# Publish Blog
10+
11+
Wire supplied content into the site and verify it. Packaging only — do not invent the piece.
12+
13+
Canonical example: `_posts/2017-03-10-we-are-all-product-designers.md`
14+
15+
If the server is not running, use `setup-dev-environment` first.
16+
17+
## Checklist
18+
19+
```
20+
- [ ] Agree date + slug + title + context with the user
21+
- [ ] Place catalogue image (and any other assets)
22+
- [ ] Write _posts/YYYY-MM-DD-kebab-slug.md front matter
23+
- [ ] Wire body from user (intro markdown and/or {% include %})
24+
- [ ] Preview post URL + homepage catalogue card
25+
- [ ] Report paths/URL; do not commit unless asked
26+
```
27+
28+
## What you assemble
29+
30+
From the reference post, a published entry is:
31+
32+
1. **Front matter** — catalogue + permalink metadata
33+
2. **Intro markdown** — user-supplied; drives the ~30-word homepage excerpt
34+
3. **Optional `{% include %}`** — user-supplied heavy body (e.g. slides embed in `_includes/`)
35+
4. **Assets** — paths that match `image` / in-body references
36+
37+
Ask for anything missing. Do not draft missing prose or slides.
38+
39+
## Front matter
40+
41+
```yaml
42+
---
43+
published: true
44+
layout: post
45+
image: /assets/article_images/talks/what-is-software-product-design.jpg
46+
image_width: 2048
47+
image_height: 1280
48+
title: What is software product design?
49+
context: DevConf Talk
50+
---
51+
```
52+
53+
- `image` + real `image_width` / `image_height` → homepage thumbnail (`catalogue_item`)
54+
- `title` → display name and permalink segment (`/:year-:month-:day/:title`)
55+
- `context` → meta label next to the date (e.g. `DevConf Talk`)
56+
- Filename slug may differ from title (`we-are-all-product-designers.md` vs title above)
57+
58+
## Assets
59+
60+
| Kind | Location |
61+
|------|----------|
62+
| Shared talk thumbnail | `assets/article_images/talks/` |
63+
| Post-specific art | `assets/article_images/YYYY-MM-DD-kebab-slug/` |
64+
| Slide/HTML body | `_includes/<name>.html``{% include <name>.html %}` |
65+
66+
Use site-root paths in the post (`/assets/...`).
67+
68+
## Body shapes (content from user)
69+
70+
**Talk packaging** (reference): short intro paragraphs, then `{% include ... %}`.
71+
72+
**Markdown packaging**: user-provided markdown in the `.md` file; optional `![...](/assets/...)` if they supply images.
73+
74+
Excerpt on the homepage = first ~30 words of content (unless `excerpt_separator` is set).
75+
76+
## Verify
77+
78+
Confirm the build succeeds, open the post URL and the homepage card, optionally refresh `.screenshots/`. Summarize what was wired; do not commit unless asked.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: setup-dev-environment
3+
description: >-
4+
Sets up the local Jekyll blog development environment: pull latest, install
5+
gems, start the server with Ruby 3.4 taint compat, and verify with screenshots.
6+
Use when starting work on this repo, getting the site running locally, or when
7+
the user asks to set up / pull / run the blog.
8+
---
9+
10+
# Setup Dev Environment
11+
12+
Get the local Jekyll blog running and verified. Environment only — no `_posts/` changes. Publishing is `publish-blog`.
13+
14+
## Checklist
15+
16+
```
17+
- [ ] git pull
18+
- [ ] bundle install (if needed)
19+
- [ ] jekyll serve with taint compat
20+
- [ ] http://127.0.0.1:4000/ returns 200
21+
- [ ] Screenshots: home + one post (desktop + mobile)
22+
- [ ] Tell the user the system is ready to start creating new posts
23+
```
24+
25+
## Sync and install
26+
27+
```bash
28+
git pull
29+
bundle install
30+
```
31+
32+
If Bundler rejects the lockfile `BUNDLED WITH` version, bump only that line to the installed Bundler version and retry.
33+
34+
## Start the server
35+
36+
github-pages safe mode skips `_plugins/`. Ruby 3.4 removed `tainted?` (Liquid still calls it). Preload the compat patch:
37+
38+
```bash
39+
RUBYOPT="-r$(pwd)/_plugins/taint_compat.rb" bundle exec jekyll serve --host 127.0.0.1 --port 4000 --livereload
40+
```
41+
42+
Expect `[taint_compat] Applied to Object` and `Server address: http://127.0.0.1:4000/`. Reuse an existing healthy server on :4000 if present.
43+
44+
## Verify with screenshots
45+
46+
```bash
47+
mkdir -p .screenshots
48+
CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
49+
"$CHROME" --headless=new --disable-gpu --hide-scrollbars --window-size=1440,900 \
50+
--screenshot=.screenshots/home-desktop.png "http://127.0.0.1:4000/"
51+
"$CHROME" --headless=new --disable-gpu --hide-scrollbars --window-size=390,844 \
52+
--screenshot=.screenshots/home-mobile.png "http://127.0.0.1:4000/"
53+
```
54+
55+
Also screenshot one recent post (desktop + mobile). `.screenshots/` is gitignored. Read the PNGs and confirm the site looks healthy.
56+
57+
## Done
58+
59+
Tell the user **the system is ready to start creating new posts**. Mention the server URL and any caveats. Stop — do not publish or edit posts.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ _site/
55
*~
66
vendor/
77
.bundle/
8+
9+
.screenshots/

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,4 +294,4 @@ DEPENDENCIES
294294
webrick
295295

296296
BUNDLED WITH
297-
1.17.2
297+
2.6.2

0 commit comments

Comments
 (0)