[READ-ONLY] Mirror of https://github.com/mrgnw/morganwill.com. morganwill.com
0

Configure Feed

Select the types of activity you want to include in your feed.

redirects = all cloudflare

+19 -71
-49
src/routes/[slug]/+page.server.js
··· 1 - 2 - import { error, redirect } from '@sveltejs/kit'; 3 - 4 - export const prerender = true; 5 - 6 - let aliases = { 7 - 'dm': 'telegram', 8 - 'li': 'linkedin', 9 - 'git': 'github', 10 - 'insta': 'instagram', 11 - 'tw': 'twitter', 12 - '': 'imessage', 13 - }; 14 - 15 - let redirects = { 16 - 'github': 'https://www.github.com/mrgnw', 17 - 'imessage': 'sms:imessage@textme.cc', 18 - 'instagram': 'https://www.instagram.com/zenfo.co/', 19 - 'linkedin': 'https://www.linkedin.com/in/mrgnw/', 20 - 'outsite': 'https://app.outsite.co/c/ZfUYmDab8', 21 - 'telegram': 'https://t.me/mrgnw', 22 - 'twitter': 'https://twitter.com/mrgnw', 23 - 'photos': 'https://500px.com/morganw?view=licensing', 24 - }; 25 - 26 - Object.keys(aliases).forEach( 27 - alias => redirects[alias] = redirects[aliases[alias]] 28 - ); 29 - 30 - // tell svelte what [slug]s are available so it can pre-render 31 - export function entries(){ 32 - return Object.keys(redirects).map( 33 - slug => ({ slug }) 34 - ); 35 - } 36 - 37 - export const load = ({ params }) => { 38 - const { slug } = params; 39 - const url = redirects[slug.toLowerCase()]; 40 - 41 - if (url) { throw redirect(301, url) } 42 - else { 43 - throw error(404, { 44 - message: 'Not found', 45 - code: 'NOT_FOUND' 46 - }); 47 - } 48 - 49 - }
+19 -22
static/_redirects
··· 1 - /github https://www.github.com/mrgnw 2 - /git https://www.github.com/mrgnw 3 - /gh https://www.github.com/mrgnw 4 - 1 + /dm https://t.me/mrgnw 2 + /gh https://www.github.com/mrgnw 3 + /git https://www.github.com/mrgnw 4 + /github https://www.github.com/mrgnw 5 + /ig https://www.instagram.com/zenfo.co 6 + /imessage sms:imessage@textme.cc 7 + /insta https://www.instagram.com/zenfo.co/ 8 + /instagram https://www.instagram.com/zenfo.co 9 + /li https://www.linkedin.com/in/mrgnw 10 + /linkedin https://www.linkedin.com/in/mrgnw 11 + /outsite https://app.outsite.co/c/ZfUYmDab8 5 12 /photo https://500px.com/morganw?view=licensing 6 13 /photos https://500px.com/morganw?view=licensing 7 - 8 - /instagram https://www.instagram.com/zenfo.co 9 - /ig https://www.instagram.com/zenfo.co 10 - 11 - /linkedin https://www.linkedin.com/in/mrgnw 12 - /li https://www.linkedin.com/in/mrgnw 13 - 14 - /telegram https://t.me/mrgnw 15 - /tg https://t.me/mrgnw 16 - 17 - /twitter https://twitter.com/mrgnw 18 - /tw https://twitter.com/mrgnw 19 - 20 - /outsite https://app.outsite.co/c/ZfUYmDab8 21 - 22 - /resume https://standardresume.co/r/LGEFmUcNScheoON51vaLu 23 - /résumé https://standardresume.co/r/LGEFmUcNScheoON51vaLu 24 - / sms:imessage@textme.cc 14 + /resume https://standardresume.co/r/LGEFmUcNScheoON51vaLu 15 + /résumé https://standardresume.co/r/LGEFmUcNScheoON51vaLu 16 + /telegram https://t.me/mrgnw 17 + /tg https://t.me/mrgnw 18 + /tw https://twitter.com/mrgnw 19 + /twitter https://twitter.com/mrgnw 20 + / sms:morgan@textme.cc 21 + /📸 https://500px.com/morganw?view=licensing