You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+37
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,43 @@ Ummmm... seems I may have used a little gemini to write the readme :shushing_fac
14
14
15
15
Well besides gemini introductions you can find a simple astro site that interfaces with [kcoderhtml/cloudflare-email](https://github.com/kcoderhtml/cloudflare-email) on the backend and is easily deployable with netlify!
16
16
17
+
## Setup
18
+
1. Fork this repo and deploy it to netlify
19
+
2. create a new Astro DB project at [studio.astro.build](https://studio.astro.build/) and generate a new app token to be added to the netlify env below
20
+
3. create a new slack app with the app manifest listed below; make sure to change the name of the app and to install it into your workspace:
21
+
```yaml
22
+
display_information:
23
+
name: Catapult Mailer - {name} Instance # can be whatever this is just what I use
24
+
description: The OAuth Provider for the {name} Catapult Mailer instance # same here
25
+
background_color: "#735bb5"# could be whatever you want
26
+
oauth_config:
27
+
redirect_urls:
28
+
- https://your-app-here.netlify.app/
29
+
scopes:
30
+
user:
31
+
- openid
32
+
- email
33
+
- profile
34
+
settings:
35
+
org_deploy_enabled: false
36
+
socket_mode_enabled: false
37
+
token_rotation_enabled: false
38
+
```
39
+
4. setup the ENV in netlify:
40
+
```s
41
+
ARCJET_KEY=ajkey_xxxxxxxxxxxxxxxxxxxxxxxxxx {you can get this from https://arcjet.com/}
42
+
ASTRO_STUDIO_APP_TOKEN=d478xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:gbaixxxxxxxxxxxxxxxxxxxxxxxx:gbaixxxxxxxxxxxxxxxxxxxxxxxx {you can get this from your astro db project}
43
+
EMAIL_API=https://email.example.com/api/email {change it to be your cloudflare email instance but always add the /api/email on the end of your base domain}
44
+
EMAIL_API_KEY={Whatever you set it to be in your cloudflare email instance}
45
+
JWT_SECRET={generate a new 256 length secret at https://jwtsecret.com/generate or with `openssl rand -hex 256`}
Copy file name to clipboardexpand all lines: src/pages/dashboard.astro
+1-1
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ if (Astro.request.method === "POST") {
34
34
html:
35
35
messageType==="text/html"
36
36
?message+
37
-
`\n\n You're receiving this email because you subscribed to ${import.meta.env.NAME}'s newsletter. If you'd like to stop receiving emails from ${import.meta.env.NAME}, <a href="${Astro.url.origin}/api/unsubscribe"> unsubscribe here </a>`
37
+
`<br><br> You're receiving this email because you subscribed to ${import.meta.env.NAME}'s newsletter. If you'd like to stop receiving emails from ${import.meta.env.NAME}, <a href="${Astro.url.origin}/api/unsubscribe"> unsubscribe here </a>`
0 commit comments