diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..57ea4cf --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +/static/typeface-pt-sans/ +/static/typeface-pt-mono/ diff --git a/Caddyfile b/Caddyfile index 3909592..4b21610 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,7 +1,8 @@ -www.kill-the-newsletter.com { +kill-the-newsletter.com { reverse_proxy localhost:8000 } -kill-the-newsletter.com { - redir https://www.kill-the-newsletter.com{uri} permanent + +www.kill-the-newsletter.com { + redir https://kill-the-newsletter.com{uri} permanent } diff --git a/LICENSE b/LICENSE index 200327f..8dcdd46 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Leandro Facchinetti (https://www.leafac.com) +Copyright (c) 2020 Leandro Facchinetti (https://leafac.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index e182daa..7495133 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -

Kill the Newsletter!

+

Kill the Newsletter!

Convert email newsletters into Atom feeds

Convert email newsletters into Atom feeds

-Source -Continuous Integration +Source +Continuous Integration

# Deploy Your Own Instance (Self-Host) 1. Create accounts on [GitHub](https://github.com), [Namecheap](https://www.namecheap.com), and [DigitalOcean](https://www.digitalocean.com). -2. [Fork](https://github.com/leafac/www.kill-the-newsletter.com/fork) this repository. +2. [Fork](https://github.com/leafac/kill-the-newsletter.com/fork) this repository. 3. Create a deployment SSH key pair: @@ -78,8 +78,8 @@ ```console $ ssh-add $ ssh -A root@ - root@ $ rsync -av /root/www.kill-the-newsletter.com/current/static/feeds/ - root@ $ rsync -av /root/www.kill-the-newsletter.com/current/static/alternate/ + root@ $ rsync -av /root/kill-the-newsletter.com/current/static/feeds/ + root@ $ rsync -av /root/kill-the-newsletter.com/current/static/alternate/ ``` 13. Push to your fork, which will trigger the GitHub Action that deploys the code and starts the server. diff --git a/index.ts b/index.ts index d753b7d..e3051d4 100644 --- a/index.ts +++ b/index.ts @@ -143,7 +143,7 @@ function layout(content: string): string {

Convert email newsletters into Atom feeds

${content}
- + `; } diff --git a/package.json b/package.json index b1077be..1a2908d 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "NODE_ENV": "production", "WEB_PORT": "8000", "EMAIL_PORT": "25", - "BASE_URL": "https://www.kill-the-newsletter.com", + "BASE_URL": "https://kill-the-newsletter.com", "EMAIL_DOMAIN": "kill-the-newsletter.com", "ISSUE_REPORT": "mailto:kill-the-newsletter@leafac.com" } @@ -67,8 +67,8 @@ "user": "root", "host": "kill-the-newsletter.com", "ref": "origin/master", - "repo": "git@github.com:leafac/www.kill-the-newsletter.com.git", - "path": "/root/www.kill-the-newsletter.com", + "repo": "git@github.com:leafac/kill-the-newsletter.com.git", + "path": "/root/kill-the-newsletter.com", "pre-setup": "(curl -sL https://deb.nodesource.com/setup_14.x | bash -) && apt install -y nodejs build-essential && (ssh -o StrictHostKeyChecking=no git@github.com || true)", "post-setup": "npm ci --production && npx pm2 startup", "post-deploy": "npm ci --production && npx pm2 startOrRestart package.json && npx pm2 save", diff --git a/test.ts b/test.ts index 35d8b71..0e11e32 100644 --- a/test.ts +++ b/test.ts @@ -80,7 +80,7 @@ describe("receive email", () => { from: "publisher@example.com", to: `${identifier}@${EMAIL_DOMAIN}`, subject: "New Message", - text: "TEXT content\n\nhttps://www.leafac.com\n\nMore text", + text: "TEXT content\n\nhttps://leafac.com\n\nMore text", }); const feed = await getFeed(identifier); const entry = feed.querySelector("feed > entry:first-of-type")!; @@ -88,7 +88,7 @@ describe("receive email", () => { entry.querySelector("link")!.getAttribute("href")! ); expect(alternate.querySelector("a")!.getAttribute("href")).toBe( - "https://www.leafac.com" + "https://leafac.com" ); });