From b9f568f80099512c4e325c3fef69e4833ebf46bd Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Sat, 8 Jul 2023 13:22:48 +0100 Subject: [PATCH] Added extra thoughts --- content/posts/link-shortener/index.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/content/posts/link-shortener/index.md b/content/posts/link-shortener/index.md index f0513262..d3185a7e 100644 --- a/content/posts/link-shortener/index.md +++ b/content/posts/link-shortener/index.md @@ -91,4 +91,13 @@ If you'd also like an API to add a new shortlink, you'll need a [val.town](https - The host refers to your _val.town_ username, so here `yourvtname-addshortlink.express.val.run` would only be accurate if your val.town account name was `yourvtname`. - The path refers to the shortlink you want to make, so here `/example` means you'd be hitting `your.tld/example` when complete. - The `to` query parameter is the destination, here that's `http://example.com`. It'll fail if you try and redirect to something on `your.tld` 😉 - - The Bearer token (`abc123` above) needs to be a [fine grained Github personal access token](https://github.com/settings/tokens?type=beta) (or the organisation equivalent) with at least "Read and Write access to code" for the `yourghname/your.tld` repo. \ No newline at end of file + - The Bearer token (`abc123` above) needs to be a [fine grained Github personal access token](https://github.com/settings/tokens?type=beta) (or the organisation equivalent) with at least "Read and Write access to code" for the `yourghname/your.tld` repo. + +## Caveats & thoughts + +- I'd like to build a [Raycast](raycast.com) extension for making new shortlinks. It's stopped raining now, so maybe later! +- If you try to post new shortlinks with the val.town API faster than the deploy time for the repo then your API call will be rejected, and you'll have to try again. I'd like to get some auto-retries in there. +- With val town and Raycast being drivable by Typescript I'd like to release this as a package, so it's mega easy to use. Perhaps it'll even have tests 😲 +- I'd _really_ like to be able to publish this blog with "other things I'd like to be included in the root hash", so I could say "resolve `/ipns/byjp.fyi/` and include that IPFS data here", so this blog always includes a 'backup' of the shortlinks. This feels like it's the tip of a bigger feature IPFS might include around deeper archival support. +- Removing shortlinks is still a manual edit of the Github repo away. I don't see much value in allowing that to be automated any time soon. +- I do need to trust val.town with write access to my shortlinks repo — if something leaked out of that part of the flow then back folks could hijack links folks may trust are mine isn't great. I should probably check the shortlinks every now and again.