File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ function getGitHubUrl(author: {
2929function getGitHubHandle ( author : {
3030 key ?: string ;
3131 url ?: string ;
32- name ?: string ;
3332} ) : string | undefined {
3433 if ( author . url && / g i t h u b \. c o m \/ / i. test ( author . url ) ) {
3534 const matched = author . url . match ( / g i t h u b \. c o m \/ ( [ ^ / ? # ] + ) / i) ;
@@ -42,10 +41,6 @@ function getGitHubHandle(author: {
4241 return `@${ author . key } ` ;
4342 }
4443
45- if ( author . name ) {
46- return `@${ author . name . toLowerCase ( ) . replace ( / \s + / g, "" ) } ` ;
47- }
48-
4944 return undefined ;
5045}
5146
@@ -72,7 +67,6 @@ export default function BlogPostItemFooterWrapper(props: Props): JSX.Element {
7267 const authorHandle = primaryAuthor
7368 ? getGitHubHandle ( {
7469 key : primaryAuthor . key ,
75- name : primaryAuthor . name ,
7670 url : primaryAuthor . url ,
7771 } )
7872 : undefined ;
@@ -83,11 +77,11 @@ export default function BlogPostItemFooterWrapper(props: Props): JSX.Element {
8377 profile ?. title ;
8478 const blogDate =
8579 metadata . date &&
86- new Date ( metadata . date ) . toLocaleDateString ( "en-US" , {
80+ new Intl . DateTimeFormat ( undefined , {
8781 year : "numeric" ,
8882 month : "short" ,
8983 day : "numeric" ,
90- } ) ;
84+ } ) . format ( new Date ( metadata . date ) ) ;
9185 const metaItems = [ authorHandle , blogDate , readTimeText ] . filter ( Boolean ) . join ( " • " ) ;
9286
9387 const showAuthorCard = Boolean ( isBlogPostPage && primaryAuthor && authorName ) ;
You can’t perform that action at this time.
0 commit comments