Added twitter.com to socials hostname index.
This commit is contained in:
parent
4b90a5feec
commit
c45852d693
23
actors.mjs
23
actors.mjs
|
|
@ -243,12 +243,19 @@ export const socials = {
|
|||
},
|
||||
};
|
||||
|
||||
export const platformsByHostname = Object.fromEntries(Object.entries(socials.urls).map(([platform, url]) => {
|
||||
const { hostname, pathname } = new URL(url);
|
||||
export const platformsByHostname = {
|
||||
...Object.fromEntries(Object.entries(socials.urls).map(([platform, url]) => {
|
||||
const { hostname, pathname } = new URL(url);
|
||||
|
||||
return [hostname, {
|
||||
platform,
|
||||
pathname: decodeURIComponent(pathname),
|
||||
url,
|
||||
}];
|
||||
}));
|
||||
return [hostname, {
|
||||
platform,
|
||||
pathname: decodeURIComponent(pathname),
|
||||
url,
|
||||
}];
|
||||
})),
|
||||
'twitter.com': {
|
||||
platform: 'twitter',
|
||||
pathname: '/{handle}',
|
||||
url: 'https://twitter.com/{handle}',
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue