fiatjaf / njump

mirror of https://git.njump.me/njump
MIT License
108 stars 24 forks source link

Feature Request: Shortened URL #34

Open henkvantijen opened 10 months ago

henkvantijen commented 10 months ago

I'd like to see an option to have a shorter URL, basically a hash of the nevent1, similar to PasteBin. So in paralel to the https://njump.me/nevent1qqs... scheme maybe something like https://njump.me/s/YA9FX4 This option would also enable to direct someone to the note or stuff by phone, for example.

Love njump, helps easing the path to Nostr, keep up the good work!

fiatjaf commented 10 months ago

You mean people say these characters with their voice over a phone? Have you ever done that?

cxplay commented 10 months ago

I don't think it's good for njump to integrate link shortening, it's important to keep the URL paths common, and if any njump goes down, we can easily get information about the event via the URL path. Short links are good for humans to read and dictate, but they can lead to Link Rot that can't be remedied later.

alltheseas commented 9 months ago

Here is a njump nevent link rendering from telegram:

image

The first 40% real estate is gibberish. I support at the least an option to for gibberish reduction.

cc @dtonon

alltheseas commented 9 months ago

Here's an implementation by nostr dev @jinglescode https://github.com/jinglescode/nostr-url-shortener

jinglescode commented 9 months ago

just add a GET request

GET https://w3.do/get?url=<url>

For example: https://w3.do/get?url=https://github.com/jinglescode/nostr-url-shortener

henkvantijen commented 9 months ago

Here is a njump nevent link rendering from telegram:

image

The first 40% real estate is gibberish. I support at the least an option to for gibberish reduction.

cc @dtonon

So the Instant View if Telegram is not enabled?
That means the 'Open Graph' tags are missing.
Will make an Issue for that.

fiatjaf commented 9 months ago

I agree with @cxplay.

dtonon commented 9 months ago

The first 40% real estate is gibberish.

This gibberish is necessary to avoid making event retrieval too complex or fragile. If someone really needs a short url, they can use a layer 2 such as w3.do, also based on Nostr.

I agree with @cxplay

I also agree