Rename default template, restyle campaign email to the Fantasy Michigan palette, write a short domain-specific README.
This commit is contained in:
@@ -15,10 +15,8 @@ jobs:
|
|||||||
- name: Install eec-campaigns
|
- name: Install eec-campaigns
|
||||||
run: go install gitea.reground.org/will/eec-campaigns@v0.1.0
|
run: go install gitea.reground.org/will/eec-campaigns@v0.1.0
|
||||||
|
|
||||||
# TODO: rename "TEMPLATE default" below to "<this-repo-name> default"
|
|
||||||
# (or any name you like) as part of customizing this template.
|
|
||||||
- name: Sync template to listmonk
|
- name: Sync template to listmonk
|
||||||
run: eec-campaigns template "TEMPLATE default" email-templates/campaign.html
|
run: eec-campaigns template "cateconners default" email-templates/campaign.html
|
||||||
env:
|
env:
|
||||||
LISTMONK_BASE_URL: ${{ secrets.CAMPAIGNS_LISTMONK_BASE_URL }}
|
LISTMONK_BASE_URL: ${{ secrets.CAMPAIGNS_LISTMONK_BASE_URL }}
|
||||||
LISTMONK_API_USER: ${{ secrets.CAMPAIGNS_LISTMONK_API_USER }}
|
LISTMONK_API_USER: ${{ secrets.CAMPAIGNS_LISTMONK_API_USER }}
|
||||||
|
|||||||
@@ -1,30 +1,23 @@
|
|||||||
# campaigns-template
|
# cateconners-campaigns
|
||||||
|
|
||||||
Gitea template repo for standing up a new domain/client's campaign content repo. Generate a new repo from this one (Gitea → this repo → "Generate Repo," or `POST /api/v1/repos/generate/will/campaigns-template`) rather than cloning it — generating starts the new repo with a clean history of its own.
|
cateconners.com's campaign content, synced to listmonk by [`eec-campaigns`](https://gitea.reground.org/will/eec-campaigns). This repo holds only campaign content and this domain's listmonk secrets — the tool itself is installed at a pinned version in CI.
|
||||||
|
|
||||||
Full reference for everything below lives in the [`eec-campaigns` README](https://gitea.reground.org/will/eec-campaigns).
|
## To send a campaign
|
||||||
|
|
||||||
## After generating a new repo from this template
|
1. Write `campaigns/<slug>/campaign.md` (frontmatter + Markdown body — see the [eec-campaigns README](https://gitea.reground.org/will/eec-campaigns#campaignmd) for the full field reference). Set `from` explicitly to `Cate Conners <hello@cateconners.com>` — Mailcow's Sender ACL only allows that exact address for this domain.
|
||||||
|
2. `git push` to `master` — CI syncs it into listmonk as a **draft** and emails a preview to `CAMPAIGNS_PREVIEW_EMAIL` (or the campaign's own `preview_emails`).
|
||||||
|
3. Check the preview inbox. Keep pushing edits until it looks right — each push re-syncs and re-previews.
|
||||||
|
4. When ready to actually send: `git tag send/<slug> && git push origin send/<slug>`. This is the one action that transitions the campaign from draft to running — a plain `git push` to master can never do it.
|
||||||
|
|
||||||
1. **Rename the template.** In `.gitea/workflows/sync-template.yml`, replace `TEMPLATE default` with a name specific to this domain (e.g. `<client> default`).
|
Alternatively, run the `Send campaign` workflow manually from Gitea Actions with the slug as input — same effect as the tag push.
|
||||||
2. **Restyle `email-templates/campaign.html`** if this client wants different branding than the stock listmonk template it starts as.
|
|
||||||
3. **Add repo secrets** (Gitea Actions → Secrets): `CAMPAIGNS_LISTMONK_BASE_URL`, `CAMPAIGNS_LISTMONK_API_USER`, `CAMPAIGNS_LISTMONK_API_TOKEN`, and optionally `CAMPAIGNS_PREVIEW_EMAIL` — scoped to this domain's own listmonk instance and its own dedicated API user (see `reground-infrastructure`'s `campaigns` Ansible role for provisioning that user).
|
|
||||||
4. **Check the tool version pin** in all four `.gitea/workflows/*.yml` files (currently `v0.1.0`) — bump it only deliberately, after confirming a newer `eec-campaigns` release works.
|
|
||||||
5. Run the `Sync default campaign template` workflow once.
|
|
||||||
6. Replace this README with a short one for this domain (see `reground-campaigns`'s README for the pattern: a numbered "to send a campaign" list for whoever operates this repo day-to-day).
|
|
||||||
7. Give the client push/PR access to *this repo only* — that's the entire isolation boundary. They never need access to `eec-campaigns`, `campaigns-template`, or any other domain's repo.
|
|
||||||
|
|
||||||
## Layout
|
## Other workflows
|
||||||
|
|
||||||
```
|
- **`Test-send campaign`** (manual) — re-preview a campaign's current content to any address, without touching its status.
|
||||||
campaigns/
|
- **`Sync default campaign template`** (manual) — pushes `email-templates/campaign.html` into listmonk as the default campaign template. Run once after setup, and again whenever that file changes.
|
||||||
<slug>/
|
|
||||||
campaign.md
|
## Setup (one-time)
|
||||||
email-templates/
|
|
||||||
campaign.html
|
Repo secrets (Gitea Actions → Secrets): `CAMPAIGNS_LISTMONK_BASE_URL`, `CAMPAIGNS_LISTMONK_API_USER`, `CAMPAIGNS_LISTMONK_API_TOKEN`, `CAMPAIGNS_PREVIEW_EMAIL`.
|
||||||
.gitea/workflows/
|
|
||||||
sync.yml # push to master -> draft + preview
|
The workflows in `.gitea/workflows/` pin a specific `eec-campaigns` version (currently `v0.1.0`). Bump that pin deliberately when a new tool version is ready, not automatically.
|
||||||
send.yml # tag push send/<slug>, or manual dispatch -> real send
|
|
||||||
test.yml # manual dispatch -> re-preview without touching status
|
|
||||||
sync-template.yml # manual dispatch -> push email template as listmonk default
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<!--
|
<!--
|
||||||
Listmonk's own stock campaign template (static/email-templates/default.tpl
|
Based on Listmonk's own stock campaign template (static/email-templates/
|
||||||
in knadh/listmonk), committed here verbatim as a known-good, unsubscribe-
|
default.tpl in knadh/listmonk), restyled to cateconners.com's Fantasy
|
||||||
capable starting point rather than something invented from scratch. Synced
|
Michigan palette (birch parchment / forest green / lake teal — see
|
||||||
into listmonk via `campaigns template <name> email-templates/campaign.html`
|
will/cateconners-site's assets/css/main.css for the canonical values).
|
||||||
(see internal/campaign/template.go) as the is_default campaign template, so
|
Synced into listmonk via `campaigns template <name> email-templates/
|
||||||
every campaign this tool creates gets a real unsubscribe link/footer without
|
campaign.html` (see internal/campaign/template.go) as the is_default
|
||||||
per-campaign template_id wiring. Restyle freely — the two load-bearing tags
|
campaign template, so every campaign this tool creates gets a real
|
||||||
are `{{ template "content" . }}` (where the campaign body gets injected) and
|
unsubscribe link/footer without per-campaign template_id wiring. The two
|
||||||
`{{ UnsubscribeURL }}` (the actual unsubscribe link); everything else here is
|
load-bearing tags are `{{ template "content" . }}` (where the campaign body
|
||||||
just Listmonk's default look.
|
gets injected) and `{{ UnsubscribeURL }}` (the actual unsubscribe link).
|
||||||
-->
|
-->
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
@@ -19,56 +19,57 @@ just Listmonk's default look.
|
|||||||
<base target="_blank">
|
<base target="_blank">
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background-color: #F0F1F3;
|
background-color: #e8ddc8;
|
||||||
font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, sans-serif;
|
font-family: Georgia, 'Times New Roman', serif;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #444;
|
color: #2b2a1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
background: #f4f4f4f4;
|
background: #e8ddc8;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #cbb98f;
|
||||||
}
|
}
|
||||||
table td {
|
table td {
|
||||||
border-color: #ddd;
|
border-color: #cbb98f;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrap {
|
.wrap {
|
||||||
background-color: #fff;
|
background-color: #f4ede1;
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
max-width: 525px;
|
max-width: 525px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
border: 1px solid #cbb98f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
background: #0055d4;
|
background: #2f5233;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
color: #fff !important;
|
color: #f4ede1 !important;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: 10px 30px;
|
padding: 10px 30px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.button:hover {
|
.button:hover {
|
||||||
background: #111;
|
background: #1f3a22;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #888;
|
color: #3b6e77;
|
||||||
}
|
}
|
||||||
.footer a {
|
.footer a {
|
||||||
color: #888;
|
color: #3b6e77;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,10 +83,10 @@ just Listmonk's default look.
|
|||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #0055d4;
|
color: #2f5233;
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
color: #111;
|
color: #1f3a22;
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 600px) {
|
@media screen and (max-width: 600px) {
|
||||||
.wrap {
|
.wrap {
|
||||||
@@ -97,17 +98,17 @@ just Listmonk's default look.
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body style="background-color: #F0F1F3;font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, sans-serif;font-size: 15px;line-height: 26px;margin: 0;color: #444;">
|
<body style="background-color: #e8ddc8;font-family: Georgia, 'Times New Roman', serif;font-size: 15px;line-height: 26px;margin: 0;color: #2b2a1f;">
|
||||||
<div class="gutter" style="padding: 30px;"> </div>
|
<div class="gutter" style="padding: 30px;"> </div>
|
||||||
<div class="wrap" style="background-color: #fff;padding: 30px;max-width: 525px;margin: 0 auto;border-radius: 5px;">
|
<div class="wrap" style="background-color: #f4ede1;padding: 30px;max-width: 525px;margin: 0 auto;border-radius: 5px;border: 1px solid #cbb98f;">
|
||||||
{{ template "content" . }}
|
{{ template "content" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer" style="text-align: center;font-size: 12px;color: #888;">
|
<div class="footer" style="text-align: center;font-size: 12px;color: #3b6e77;">
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ UnsubscribeURL }}" style="color: #888;">{{ L.T "email.unsub" }}</a>
|
<a href="{{ UnsubscribeURL }}" style="color: #3b6e77;">{{ L.T "email.unsub" }}</a>
|
||||||
|
|
||||||
<a href="{{ MessageURL }}" style="color: #888;">{{ L.T "email.viewInBrowser" }}</a>
|
<a href="{{ MessageURL }}" style="color: #3b6e77;">{{ L.T "email.viewInBrowser" }}</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="gutter" style="padding: 30px;"> {{ TrackView }}</div>
|
<div class="gutter" style="padding: 30px;"> {{ TrackView }}</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user