PauseAI / pauseai-website

Website for PauseAI.info
https://pauseai.info
Other
10 stars 37 forks source link

"Short links" to external services under separate subdomain #98

Open Wituareard opened 7 months ago

Wituareard commented 7 months ago

It could be useful to offer easier to remember redirects to external services, most importantly Discord, under a separate subdomain (to avoid confusion about the redirect). For example, it could be something like go.pauseai.info/discord to join the Discord. I'd suggest redirecting the root URL and unknown URLs to a page with a list of the most useful redirects.

I'm not sure how this should be implemented yet. There are externals services like https://short.io/ that offer a limited number of redirects under your own domain for free, but then you are dependent on their goodwill and/or their ability to export data. If the redirects are implemented through the SvelteKit load function, I'm not sure how the preload-on-hover feature plays together with that if they are linked somewhere. Maybe we could start with the Netlify _redirects file?

joepio commented 7 months ago

Good idea! I don't think we need the subdomain, tbh - only makes it longer.

We can have a /discord and /mail or whatever. Indeed, the _redirects file is a great option!

Wituareard commented 7 months ago

Hm, I think a subdomain makes sense to avoid the possible confusion of being redirected when clicking on a normal pauseai.info link, where you'd expect that it takes you to the website.

joepio commented 7 months ago

We could internally keep using the direct external links. These are faster anyways.

Wituareard commented 7 months ago

Sure, but if someone sends me a normal pauseai.info link, or I see it somewhere else, I'd expect it to take me to a pauseai.info website.

Wituareard commented 7 months ago

Okay doesn't seem to work, probably because the function already matches /*

joepio commented 7 months ago

My bad, I used the full .org URL instead of just the /discord

Wituareard commented 7 months ago

It should have worked anyway https://docs.netlify.com/routing/redirects/redirect-options/#domain-level-redirects

joepio commented 7 months ago

Not sure why this _redirects file isn't working yet:

https://pauseai.org/* https://pauseai.info/:splat 301!
/discord https://discord.gg/2XXWXvErfA
Wituareard commented 7 months ago

I suspect it's because the edge function matches /.* minus /pagefind/.* per the generated manifest.json and gets priority over the redirects.

joepio commented 7 months ago

I tried to revert their order

Wituareard commented 7 months ago

These are the redirects I'd propose. Especially for the more generic ones, I still really think a subdomain would help to avoid confusion. A few ideas: go.pauseai.info, to.pauseai.info, link.pauseai.info

{
    'shop': 'https://pauseai-shop.fourthwall.com/',
    'store': 'https://pauseai-shop.fourthwall.com/',
    'merchandise': 'https://pauseai-shop.fourthwall.com/',
    'merch': 'https://pauseai-shop.fourthwall.com/',
    'bunq': 'https://bunq.me/pauseai',
    'discord': 'https://discord.gg/2XXWXvErfA',
    'x': 'https://x.com/PauseAI',
    'twitter': 'https://twitter.com/PauseAI',
    'linkedin': 'https://www.linkedin.com/company/pauseai',
    'facebook': 'https://www.facebook.com/PauseAI/',
    'tiktok': 'https://www.tiktok.com/@pauseai',
    'instagram': 'https://www.instagram.com/pause_ai/',
    'youtube': 'https://www.youtube.com/@PauseAI',
    'github': 'https://github.com/joepio/pauseai',
    'figma': 'https://www.figma.com/community/file/1233064002969152026',
    'drive': 'https://drive.google.com/drive/folders/1bQ_MZ8giK-Mee4ABkO0BgcFInaXruNpa?usp=sharing',
    'calendar': 'https://calendar.google.com/calendar/u/0?cid=Y19mNWE4YWYyMDZlNjM1ODc2NjVjNmU4MzAzOTgzZmVmYWYzYTBjNjE0NGRiMGFhNDljOTcwZWZhNTEwYTNkODY3QGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20'
}
Wituareard commented 7 months ago

Using the load function works fine btw, so you'd just have to configure it with Netlify, and it could be handled by SvelteKit.