Skip to content

Commit 88f0196

Browse files
feat: switch newsletter from Loops to Brevo (#71)
## PR Checklist - [x] Steps in [CONTRIBUTING.md](https://github.com/SquiggleTools/SquiggleConf.com/blob/main/.github/CONTRIBUTING.md) were taken ## Overview We'll need to set up `BREVO_API_KEY` and `BREVO_LIST_ID` in the deployment settings. 🩵
1 parent d972797 commit 88f0196

13 files changed

Lines changed: 82 additions & 11 deletions

File tree

.astro/types.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/// <reference types="astro/client" />
2-
/// <reference path="content.d.ts" />
2+
/// <reference path="content.d.ts" />
3+
/// <reference path="env.d.ts" />

.env.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BREVO_API_KEY=<insert here>
2+
BREVO_LIST_ID=3

.github/workflows/ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ jobs:
55
steps:
66
- uses: actions/checkout@v4
77
- uses: ./.github/actions/prepare
8+
- run: cp .env.template .env
89
- run: pnpm build
910
lint:
1011
name: Lint
1112
runs-on: ubuntu-latest
1213
steps:
1314
- uses: actions/checkout@v4
1415
- uses: ./.github/actions/prepare
16+
- run: pnpm astro sync
1517
- run: pnpm lint
1618
lint_knip:
1719
name: Lint Knip
@@ -47,6 +49,7 @@ jobs:
4749
steps:
4850
- uses: actions/checkout@v4
4951
- uses: ./.github/actions/prepare
52+
- run: pnpm astro sync
5053
- run: pnpm tsc
5154

5255
name: CI

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.astro
2+
.env
23
.vercel
34
/dist
45
/node_modules

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ pnpm i
2020
pnpm dev
2121
```
2222

23+
### Environment Variables
24+
25+
To get the newsletter API running, copy `.env.template` to an `.env` file and fill in the Brevo API key value from our password manager.
26+
This is not necessary unless you want to work on the newsletter API.
27+
2328
## Contributors
2429

2530
<!-- spellchecker: disable -->

astro.config.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
import vercel from "@astrojs/vercel";
22
import { konamiEmojiBlast } from "@konami-emoji-blast/astro";
3-
import { defineConfig } from "astro/config";
3+
import { defineConfig, envField } from "astro/config";
44

55
export default defineConfig({
66
adapter: vercel({
77
webAnalytics: { enabled: true },
88
}),
9+
env: {
10+
schema: {
11+
BREVO_API_KEY: envField.string({ access: "secret", context: "server" }),
12+
BREVO_LIST_ID: envField.number({ access: "public", context: "server" }),
13+
},
14+
},
915
image: {
1016
layout: "constrained",
1117
responsiveStyles: true,

cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"words": [
1717
"astropub",
1818
"bootcamps",
19+
"brevo",
1920
"d'œuvres",
2021
"devries",
2122
"dimitri",

eslint.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export default defineConfig(
6363
},
6464
},
6565
rules: {
66+
"n/no-missing-import": "off",
6667
"n/no-unpublished-import": "off",
6768

6869
// Stylistic concerns that don't interfere with Prettier

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"sharp": "^0.34.5",
4343
"temporal-polyfill": "^0.3.0",
4444
"uqr": "^0.1.2",
45-
"wifi-share-link": "^0.1.2"
45+
"wifi-share-link": "^0.1.2",
46+
"zod": "^4.3.6"
4647
},
4748
"devDependencies": {
4849
"@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)