Remove www

This commit is contained in:
Leandro Facchinetti 2020-08-04 22:57:49 +01:00
parent 175fdcae6b
commit c51272f340
7 changed files with 19 additions and 16 deletions

2
.prettierignore Normal file
View File

@ -0,0 +1,2 @@
/static/typeface-pt-sans/
/static/typeface-pt-mono/

View File

@ -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
}

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020 Leandro Facchinetti <license@leafac.com> (https://www.leafac.com)
Copyright (c) 2020 Leandro Facchinetti <license@leafac.com> (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

View File

@ -1,16 +1,16 @@
<h1 align="center"><a href="https://www.kill-the-newsletter.com">Kill the Newsletter!</a></h1>
<h1 align="center"><a href="https://kill-the-newsletter.com">Kill the Newsletter!</a></h1>
<h3 align="center">Convert email newsletters into Atom feeds</h3>
<p align="center"><img alt="Convert email newsletters into Atom feeds" src="static/logo.svg"></p>
<p align="center">
<a href="https://github.com/leafac/www.kill-the-newsletter.com"><img alt="Source" src="https://img.shields.io/badge/Source---"></a>
<a href="https://github.com/leafac/www.kill-the-newsletter.com/actions"><img alt="Continuous Integration" src="https://github.com/leafac/www.kill-the-newsletter.com/workflows/.github/workflows/main.yml/badge.svg"></a>
<a href="https://github.com/leafac/kill-the-newsletter.com"><img alt="Source" src="https://img.shields.io/badge/Source---"></a>
<a href="https://github.com/leafac/kill-the-newsletter.com/actions"><img alt="Continuous Integration" src="https://github.com/leafac/kill-the-newsletter.com/workflows/.github/workflows/main.yml/badge.svg"></a>
</p>
# 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@<YOUR DOMAIN, FOR EXAMPLE, kill-the-newsletter.com>
root@<YOUR DOMAIN, FOR EXAMPLE, kill-the-newsletter.com> $ rsync -av <path-to-previous-feeds> /root/www.kill-the-newsletter.com/current/static/feeds/
root@<YOUR DOMAIN, FOR EXAMPLE, kill-the-newsletter.com> $ rsync -av <path-to-previous-alternate> /root/www.kill-the-newsletter.com/current/static/alternate/
root@<YOUR DOMAIN, FOR EXAMPLE, kill-the-newsletter.com> $ rsync -av <path-to-previous-feeds> /root/kill-the-newsletter.com/current/static/feeds/
root@<YOUR DOMAIN, FOR EXAMPLE, kill-the-newsletter.com> $ rsync -av <path-to-previous-alternate> /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.

View File

@ -143,7 +143,7 @@ function layout(content: string): string {
<p><img alt="Convert email newsletters into Atom feeds" src="/logo.svg"></p>
</header>
<main>${content}</main>
<footer><p>By <a href="https://www.leafac.com">Leandro Facchinetti</a> · <a href="https://github.com/leafac/www.kill-the-newsletter.com">Source</a> · <a href="${ISSUE_REPORT}">Report an Issue</a></p></footer>
<footer><p>By <a href="https://leafac.com">Leandro Facchinetti</a> · <a href="https://github.com/leafac/kill-the-newsletter.com">Source</a> · <a href="${ISSUE_REPORT}">Report an Issue</a></p></footer>
`;
}

View File

@ -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",

View File

@ -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"
);
});