alpha
Login
or
Join now
xcc.es
/
morganwill.com
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/mrgnw/morganwill.com.
morganwill.com
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
redirects = all cloudflare
author
Morgan
date
2 years ago
(Oct 18, 2023, 3:08 PM +0200)
commit
edd41a0c
edd41a0cb72f0595d8f3e9f39257c54730800a8b
parent
59db1966
59db1966a56c7d944ef1dcec8ae80fc251200972
+19
-71
2 changed files
Expand all
Collapse all
Unified
Split
src
routes
[slug]
+page.server.js
static
_redirects
-49
src/routes/[slug]/+page.server.js
Reviewed
···
1
1
-
2
2
-
import { error, redirect } from '@sveltejs/kit';
3
3
-
4
4
-
export const prerender = true;
5
5
-
6
6
-
let aliases = {
7
7
-
'dm': 'telegram',
8
8
-
'li': 'linkedin',
9
9
-
'git': 'github',
10
10
-
'insta': 'instagram',
11
11
-
'tw': 'twitter',
12
12
-
'': 'imessage',
13
13
-
};
14
14
-
15
15
-
let redirects = {
16
16
-
'github': 'https://www.github.com/mrgnw',
17
17
-
'imessage': 'sms:imessage@textme.cc',
18
18
-
'instagram': 'https://www.instagram.com/zenfo.co/',
19
19
-
'linkedin': 'https://www.linkedin.com/in/mrgnw/',
20
20
-
'outsite': 'https://app.outsite.co/c/ZfUYmDab8',
21
21
-
'telegram': 'https://t.me/mrgnw',
22
22
-
'twitter': 'https://twitter.com/mrgnw',
23
23
-
'photos': 'https://500px.com/morganw?view=licensing',
24
24
-
};
25
25
-
26
26
-
Object.keys(aliases).forEach(
27
27
-
alias => redirects[alias] = redirects[aliases[alias]]
28
28
-
);
29
29
-
30
30
-
// tell svelte what [slug]s are available so it can pre-render
31
31
-
export function entries(){
32
32
-
return Object.keys(redirects).map(
33
33
-
slug => ({ slug })
34
34
-
);
35
35
-
}
36
36
-
37
37
-
export const load = ({ params }) => {
38
38
-
const { slug } = params;
39
39
-
const url = redirects[slug.toLowerCase()];
40
40
-
41
41
-
if (url) { throw redirect(301, url) }
42
42
-
else {
43
43
-
throw error(404, {
44
44
-
message: 'Not found',
45
45
-
code: 'NOT_FOUND'
46
46
-
});
47
47
-
}
48
48
-
49
49
-
}
+19
-22
static/_redirects
View file
Reviewed
···
1
1
-
/github https://www.github.com/mrgnw
2
2
-
/git https://www.github.com/mrgnw
3
3
-
/gh https://www.github.com/mrgnw
4
4
-
1
1
+
/dm https://t.me/mrgnw
2
2
+
/gh https://www.github.com/mrgnw
3
3
+
/git https://www.github.com/mrgnw
4
4
+
/github https://www.github.com/mrgnw
5
5
+
/ig https://www.instagram.com/zenfo.co
6
6
+
/imessage sms:imessage@textme.cc
7
7
+
/insta https://www.instagram.com/zenfo.co/
8
8
+
/instagram https://www.instagram.com/zenfo.co
9
9
+
/li https://www.linkedin.com/in/mrgnw
10
10
+
/linkedin https://www.linkedin.com/in/mrgnw
11
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
7
-
8
8
-
/instagram https://www.instagram.com/zenfo.co
9
9
-
/ig https://www.instagram.com/zenfo.co
10
10
-
11
11
-
/linkedin https://www.linkedin.com/in/mrgnw
12
12
-
/li https://www.linkedin.com/in/mrgnw
13
13
-
14
14
-
/telegram https://t.me/mrgnw
15
15
-
/tg https://t.me/mrgnw
16
16
-
17
17
-
/twitter https://twitter.com/mrgnw
18
18
-
/tw https://twitter.com/mrgnw
19
19
-
20
20
-
/outsite https://app.outsite.co/c/ZfUYmDab8
21
21
-
22
22
-
/resume https://standardresume.co/r/LGEFmUcNScheoON51vaLu
23
23
-
/résumé https://standardresume.co/r/LGEFmUcNScheoON51vaLu
24
24
-
/ sms:imessage@textme.cc
14
14
+
/resume https://standardresume.co/r/LGEFmUcNScheoON51vaLu
15
15
+
/résumé https://standardresume.co/r/LGEFmUcNScheoON51vaLu
16
16
+
/telegram https://t.me/mrgnw
17
17
+
/tg https://t.me/mrgnw
18
18
+
/tw https://twitter.com/mrgnw
19
19
+
/twitter https://twitter.com/mrgnw
20
20
+
/ sms:morgan@textme.cc
21
21
+
/📸 https://500px.com/morganw?view=licensing