aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2024-01-21 13:56:39 +0000
committerRuben Beltran del Rio <ruben@unlimited.pizza>2024-01-21 13:56:39 +0000
commit9d9552d186c136c8252a5a5b1abc972279624061 (patch)
tree83d1af9156fea2c7a53a8d53b7ebff93ca52b9cd
parent79854624d936f395bed3202bb84139afa52c36e5 (diff)
Make some of the values more generic
-rw-r--r--index.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/index.js b/index.js
index f8df008..518cc79 100644
--- a/index.js
+++ b/index.js
@@ -10,7 +10,10 @@ const internals = {
apiToken: process.env.PINBOARD_TOKEN,
blogUrl: process.env.BLOG_URL,
archiveUrl: process.env.ARCHIVE_URL,
+ blogPublicUrl: process.env.BLOG_PUBLIC_URL,
+ archivePublicUrl: process.env.ARCHIVE_PUBLIC_URL,
tootToken: process.env.TOOT_TOKEN,
+ mastodonDomain: process.env.MASTODON_DOMAIN,
date: (new Date()).toISOString().split('T')[0],
@@ -45,9 +48,9 @@ const internals = {
const body = new FormData();
body.set(
'status',
- `New post: ${title}\n\nAvailable on:\n\nā™Šļø the gemini archive gemini://gemini.unlimited.pizza/gemlog/\n\n or, the ephemeral blog 🌐: https://www.unlimited.pizza/gemlog`
+ `New post: ${title}\n\nAvailable on:\n\nā™Šļø the gemini archive ${internals.archivePublicUrl}\n\n or, the ephemeral blog 🌐: ${internals.blogPublicUrl}`
);
- return fetch('https://friendship.quest/api/v1/statuses', {
+ return fetch(`https://${internals.mastodonDomain}/api/v1/statuses`, {
method: 'post',
headers: {
Authorization: `Bearer ${internals.tootToken}`,