mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-09-17 16:35:31 -04:00
add Mastodon link
This commit is contained in:
@@ -39,5 +39,6 @@ module.exports = {
|
||||
medium: "jakejarvis",
|
||||
linkedin: "jakejarvis",
|
||||
instagram: "jakejarvis",
|
||||
mastodon: "fosstodon.org/@jakejarvis",
|
||||
},
|
||||
};
|
||||
|
@@ -112,6 +112,7 @@ export const socialProfileJsonLd: SocialProfileJsonLdProps = {
|
||||
`https://www.linkedin.com/in/${config.authorSocial?.linkedin}/`,
|
||||
`https://www.facebook.com/${config.authorSocial?.facebook}`,
|
||||
`https://www.instagram.com/${config.authorSocial?.instagram}/`,
|
||||
`https://${config.authorSocial?.mastodon}`,
|
||||
],
|
||||
};
|
||||
|
||||
|
@@ -15,14 +15,14 @@ const IsomorphicDayJs = (date?: dayjs.ConfigType): dayjs.Dayjs => {
|
||||
dayjs.extend(dayjsLocalizedFormat);
|
||||
dayjs.extend(dayjsAdvancedFormat);
|
||||
|
||||
return dayjs(date).locale("en");
|
||||
return dayjs(date).locale("en").tz(timeZone).clone();
|
||||
};
|
||||
|
||||
// simple wrapper around dayjs.format() to normalize timezone across the site, both server and client side, to prevent
|
||||
// hydration errors by returning an instance of dayjs with these defaults set.
|
||||
// date defaults to now, format defaults to ISO 8601 (e.g. 2022-04-07T21:53:33-04:00)
|
||||
export const formatDate = (date?: dayjs.ConfigType, formatStr?: string): string => {
|
||||
return IsomorphicDayJs(date).tz(timeZone).format(formatStr);
|
||||
return IsomorphicDayJs(date).format(formatStr);
|
||||
};
|
||||
|
||||
// returns the human-friendly difference between now and given date (e.g. "5 minutes", "9 months", etc.)
|
||||
|
Reference in New Issue
Block a user