fix(email): document post-queue render path and tighten guard
This commit is contained in:
@@ -71,7 +71,7 @@ email/
|
||||
invitation.html # MODIFY
|
||||
banned.html # MODIFY
|
||||
test.html # MODIFY
|
||||
notification.html # MODIFY: keeps body, IMPORTs post-queue-body when applicable
|
||||
notification.html # MODIFY: keeps {body}; post queue flow supplies rendered post-queue body
|
||||
digest.html # MODIFY: keeps loops; reskinned
|
||||
README.md # MODIFY: partials now real; document IMPORT + literal-hex constraint
|
||||
languages/
|
||||
@@ -526,7 +526,7 @@ git commit -m "feat(email): convert banned.html to shared partials + brand"
|
||||
|
||||
### Task 8: Convert `notification.html` + reskin `post-queue-body.html`
|
||||
|
||||
`notification.html` keeps its notification body and imports `post-queue-body.html` for post-queue notifications.
|
||||
`notification.html` keeps `{body}`. NodeBB's post queue flow renders `post-queue-body.html` server-side into that notification body before the email template renders.
|
||||
|
||||
**Files:**
|
||||
- Modify: `email/notification.html`, `email/partials/post-queue-body.html`
|
||||
@@ -558,9 +558,9 @@ git commit -m "feat(email): convert banned.html to shared partials + brand"
|
||||
<p style="color: #3a3340;">{content}</p>
|
||||
```
|
||||
|
||||
- [x] **Step 2: Read `email/notification.html`** (lines ~166–417 are the header/body/footer). Note where it renders the notification body and whether it already `IMPORT`s `post-queue-body.html`.
|
||||
- [x] **Step 2: Read `email/notification.html`** (lines ~166–417 are the header/body/footer). Note where it renders `{body}`; post-queue content is supplied by NodeBB before template render.
|
||||
|
||||
- [x] **Step 3: Apply the Task 6 transform to `notification.html`** — IMPORT header + `[[email:notification.preheader]]` preheader + retained body table (palette/font find/replace) + IMPORT footer. Preserve the `.notification-body` content and any `{{{ if }}}` post-queue branch; if the body renders a post-queue item, keep/add `<!-- IMPORT emails/partials/post-queue-body.html -->` inside that branch. Add `style="color: #a8893f;"` to notification body links.
|
||||
- [x] **Step 3: Apply the Task 6 transform to `notification.html`** — IMPORT header + `[[email:notification.preheader]]` preheader + retained body table (palette/font find/replace) + IMPORT footer. Preserve the `.notification-body` content that renders `{body}`; post-queue content is already rendered into that value by NodeBB before this template runs. Add `style="color: #a8893f;"` to notification body links.
|
||||
|
||||
- [ ] **Step 4: Guard + build**
|
||||
|
||||
@@ -709,4 +709,4 @@ Task 12 note: `node scripts/check-emails.js` passed with `Email template check p
|
||||
|
||||
**Placeholder scan:** Color/font changes given as a concrete find/replace table; `header.html`/`footer.html`/`reset.html`/`post-queue-body.html` given as complete markup; per-template specifics tabulated. Tasks 6–9 reference complete bodies that already exist in the repo (transform, not author-from-scratch) — the engineer reads the existing file and applies the listed mechanical changes. No "TBD"/"handle edge cases".
|
||||
|
||||
**Type/name consistency:** Import paths (`emails/partials/header.html`/`footer.html`/`post-queue-body.html`), preheader keys (`[[email:<name>.preheader]]`), the `<!-- preheader -->` marker, and the guard script's regexes all agree across tasks.
|
||||
**Type/name consistency:** Import paths (`emails/partials/header.html`/`footer.html`), preheader keys (`[[email:<name>.preheader]]`), the `<!-- preheader -->` marker, and the guard script's regexes all agree across tasks. `post-queue-body.html` is rendered by NodeBB's post queue flow into notification body content.
|
||||
|
||||
Reference in New Issue
Block a user