Skip to content

Commit f9c4e8f

Browse files
authored
docs: document deployment model, version pinning, and Hugo future-date gotcha (#65)
* Fix the future date issue so the page is live. * Bump GitHub Actions to versions running on Node.js 24 (#64) * docs: document deployment model, version pinning, and Hugo future-date gotcha Signed-off-by: Steve Scargall <37674041+sscargal@users.noreply.github.com>
1 parent 70fbb34 commit f9c4e8f

5 files changed

Lines changed: 56 additions & 20 deletions

File tree

.claude/skills/hugo-chores/SKILL.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,24 @@ Perform maintenance tasks on the MemMachine website repository. Subcommands hand
1717
/hugo-chores update-npm # audit and update npm dependencies
1818
```
1919

20+
## Deployment Model
21+
22+
The site deploys automatically. Every push to `main` triggers the GitHub Actions workflow at `.github/workflows/hugo.yaml`, which builds the site with Hugo and deploys the output to GitHub Pages. There is no manual deploy step — merging a PR to `main` is the deploy.
23+
24+
**All tool versions are pinned as `env:` vars at the top of that workflow file:**
25+
26+
```yaml
27+
env:
28+
DART_SASS_VERSION: 1.91.0
29+
GO_VERSION: 1.25.0
30+
HUGO_VERSION: 0.149.0
31+
NODE_VERSION: 22.18.0
32+
```
33+
34+
To upgrade any tool, edit the corresponding env var in `.github/workflows/hugo.yaml` and push to main.
35+
36+
---
37+
2038
## What You Must Do When Invoked
2139

2240
If no subcommand is given, print the usage above and list the available subcommands with one-line descriptions. Do not run any commands.
@@ -54,11 +72,10 @@ If the latest is newer, proceed.
5472

5573
### Step 4 — Update the workflow file
5674

57-
In `.github/workflows/hugo.yaml`, find the Hugo installation step. Update the version string from the old version to the new version. Use the Edit tool for a targeted replacement.
75+
In `.github/workflows/hugo.yaml`, update the `HUGO_VERSION` env var at the top of the `build` job. Use the Edit tool for a targeted replacement.
5876

59-
Common patterns to update:
60-
- `extended_0.149.0``extended_{new_version}` (without the leading `v`)
61-
- `HUGO_VERSION: '0.149.0'``HUGO_VERSION: '{new_version}'`
77+
The exact line to change (no quotes around the version):
78+
- `HUGO_VERSION: 0.149.0` → `HUGO_VERSION: {new_version}` (without a leading `v`)
6279

6380
### Step 5 — Update documentation
6481

.claude/skills/write-blog/SKILL.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ If any of the following are not provided in the invocation arguments, ask for th
2929
| **author** | Yes | Author's full name as it should appear on the post |
3030
| **description** | Yes | One sentence for SEO and social preview cards |
3131
| **tags** | Yes | Comma-separated list (e.g., "AI Agent, Integration, LLM"). Always include at least one. |
32-
| **date** | Yes | Publish date in `YYYY-MM-DD` format. Defaults to today if not provided. |
32+
| **date** | Yes | Publish date in `YYYY-MM-DD` format. Defaults to today if not provided. **Must not be in the future** — Hugo silently suppresses future-dated posts at build time unless `--buildFuture` is passed. If the post won't appear, check the date first. |
3333
| **featured** | No | Should this post appear in the homepage carousel? (add tag `"featured"`) |
3434

3535
### Step 2 — Derive the slug and path
@@ -60,6 +60,8 @@ YYYY-MM-DDTHH:MM:SS-07:00 # Pacific Daylight Time (summer)
6060
```
6161
Default time: `09:00:00` (9 AM).
6262

63+
> **Date gotcha:** Hugo silently drops any post whose `date` is in the future — it will not appear in the local server or the deployed site. Always use today's date or a past date. If you do not know the current date, ask the user before writing the file.
64+
6365
### Step 4 — Build the tags array
6466

6567
Start with the user-provided tags. Clean each tag:
@@ -87,11 +89,12 @@ draft: false
8789
Replace this comment with your blog post content.
8890
8991
BEFORE PUBLISHING:
90-
1. Add featured_image.png to this directory (same folder as this index.md)
91-
2. Set draft: false in the frontmatter above
92-
3. Preview: hugo server --buildDrafts --bind 0.0.0.0
93-
4. Build check: hugo --gc --minify
94-
5. Commit with signed commit: git commit -sS -m "Add blog: {title}"
92+
1. Confirm the date above is today or in the past — Hugo silently hides future-dated posts
93+
2. Add featured_image.png to this directory (same folder as this index.md)
94+
3. Set draft: false in the frontmatter above
95+
4. Preview: hugo server --buildDrafts --bind 0.0.0.0
96+
5. Build check: hugo --gc --minify
97+
6. Commit with signed commit: git commit -sS -m "Add blog: {title}"
9598
-->
9699
```
97100

AGENTS.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ This repository is the source for [memmachine.ai](https://memmachine.ai/), the p
1414

1515
| Component | Version | Notes |
1616
|-----------|---------|-------|
17-
| Hugo | ≥ 0.149.0 **Extended** | Must be Extended edition (Sass support) |
18-
| Go | ≥ 1.25.0 | Hugo module dependency |
19-
| Node.js | ≥ 22.x | PostCSS / Autoprefixer |
17+
| Hugo | ≥ 0.149.0 **Extended** | Must be Extended edition (Sass support); pinned via `HUGO_VERSION` in workflow |
18+
| Dart Sass | 1.91.0 | CSS compilation; pinned via `DART_SASS_VERSION` in workflow |
19+
| Go | ≥ 1.25.0 | Hugo module dependency; pinned via `GO_VERSION` in workflow |
20+
| Node.js | ≥ 22.x | PostCSS / Autoprefixer; pinned via `NODE_VERSION` in workflow |
2021
| npm | bundled with Node.js | Dependency management |
2122
| Theme | `memmachine` (custom) | Lives in `themes/memmachine/` |
22-
| Deployment | GitHub Pages | Via `.github/workflows/hugo.yaml` |
23+
| Deployment | GitHub Pages | Push to `main` → GitHub Actions → Pages (automatic) |
2324

2425
---
2526

@@ -169,7 +170,18 @@ The `memmachine` theme is fully custom (not a Hugo community theme). It uses:
169170

170171
File: `.github/workflows/hugo.yaml`
171172

172-
Triggers on: push to `main` branch, or manual workflow dispatch.
173+
Triggers on: push to `main` branch, or manual workflow dispatch. **Merging a PR to `main` is the deploy** — there is no separate deploy step.
174+
175+
All tool versions are pinned as `env:` vars at the top of the `build` job:
176+
177+
| Variable | Current value |
178+
|----------|--------------|
179+
| `HUGO_VERSION` | `0.149.0` |
180+
| `DART_SASS_VERSION` | `1.91.0` |
181+
| `GO_VERSION` | `1.25.0` |
182+
| `NODE_VERSION` | `22.18.0` |
183+
184+
To upgrade any tool, edit its variable and push. The download URLs in the workflow derive the version from these vars automatically.
173185

174186
Steps:
175187
1. Checkout (with submodules, full history)

archetypes/blog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ author: ""
77
description: ""
88
draft: true
99
---
10+
{{/* NOTE: Hugo silently hides posts whose date is in the future. Keep date = today or earlier. */}}

content/AGENTS.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ draft: true
7575
| Field | Type | Required | Notes |
7676
|-------|------|----------|-------|
7777
| `title` | string | Yes | Full title, used in `<h1>`, og:title, and blog card |
78-
| `date` | RFC 3339 | Yes | ISO 8601 with timezone offset, e.g. `2026-04-27T09:00:00-08:00` |
78+
| `date` | RFC 3339 | Yes | ISO 8601 with timezone offset, e.g. `2026-04-27T09:00:00-08:00`. **Must be today or in the past.** Hugo silently suppresses future-dated posts — they will not appear in local preview or the deployed site unless `--buildFuture` is passed. |
7979
| `featured_image` | string | Yes | Filename only (not path); file must be in the same directory as `index.md` |
8080
| `tags` | string array | Yes | Used for taxonomy pages; include `"featured"` to appear in homepage carousel |
8181
| `author` | string | Yes | Full name as it should appear on the post |
@@ -97,10 +97,13 @@ Common existing tags: `"AI Agent"`, `"AI Memory"`, `"Generative AI"`, `"LLM"`, `
9797
### Publishing
9898

9999
When the post is ready:
100-
1. Set `draft: false` in frontmatter.
101-
2. Build and preview locally: `hugo server --buildDrafts``hugo server`
102-
3. Commit with a signed commit: `git commit -sS -m "Add blog: Post Title"`
103-
4. Open a pull request against the upstream `main` branch.
100+
1. Confirm `date` is today or in the past — a future date silently prevents the post from appearing.
101+
2. Set `draft: false` in frontmatter.
102+
3. Build and preview locally: `hugo server --buildDrafts``hugo server` (no drafts flag confirms the post is visible).
103+
4. Commit with a signed commit: `git commit -sS -m "Add blog: Post Title"`
104+
5. Open a pull request against the upstream `main` branch.
105+
106+
> **If a post is missing after publish:** Check `date` first. Hugo drops future-dated content without any warning. Use `hugo server --buildFuture` to temporarily reveal them during debugging.
104107
105108
---
106109

0 commit comments

Comments
 (0)