Compare commits

..

1 Commits

Author SHA1 Message Date
c45852d693 Added twitter.com to socials hostname index. 2025-12-28 05:59:14 +01:00

View File

@@ -243,7 +243,8 @@ export const socials = {
}, },
}; };
export const platformsByHostname = Object.fromEntries(Object.entries(socials.urls).map(([platform, url]) => { export const platformsByHostname = {
...Object.fromEntries(Object.entries(socials.urls).map(([platform, url]) => {
const { hostname, pathname } = new URL(url); const { hostname, pathname } = new URL(url);
return [hostname, { return [hostname, {
@@ -251,4 +252,10 @@ export const platformsByHostname = Object.fromEntries(Object.entries(socials.url
pathname: decodeURIComponent(pathname), pathname: decodeURIComponent(pathname),
url, url,
}]; }];
})); })),
'twitter.com': {
platform: 'twitter',
pathname: '/{handle}',
url: 'https://twitter.com/{handle}',
},
};