-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FI-2622: Update meta tags for link unfurling (#553)
* add meta description * add custom meta tags * add twitter meta tags * update description tag * move tags to wrapper * move meta tags to separate component for consistency
- Loading branch information
1 parent
e2773e9
commit 9d0288e
Showing
7 changed files
with
84 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React, { FC } from 'react'; | ||
|
||
export interface MetaTagsProps { | ||
title: string; | ||
description: string; | ||
} | ||
|
||
/* Meta tags for link unfurling */ | ||
const MetaTags: FC<MetaTagsProps> = ({ title, description }) => { | ||
// These tags are dynamic -- static tags are located in index.html.erb | ||
return ( | ||
<> | ||
<title>{title}</title> | ||
<link rel="canonical" href={window.location.href} /> | ||
<meta name="description" content={description} /> | ||
<meta name="og:title" content={title} /> | ||
<meta name="og:description" content={description} /> | ||
<meta name="twitter:title" content={title} /> | ||
<meta name="twitter:description" content={description} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default MetaTags; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters