-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from laem/points-v2
Points v2
- Loading branch information
Showing
12 changed files
with
145 additions
and
50 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,33 @@ | ||
import { Helmet } from 'react-helmet' | ||
import { useLocation } from 'react-router-dom' | ||
|
||
const websiteURL = 'https://villes.plus' | ||
|
||
export default function Meta({ title, description, image, url, children }) { | ||
const { pathname } = useLocation() | ||
return ( | ||
<Helmet> | ||
<title>{title} - Villes.plus</title> | ||
<meta name="description" content={description} /> | ||
<meta property="og:type" content="website" /> | ||
<meta property="og:title" content={title} /> | ||
<meta property="og:description" content={description} /> | ||
<meta property="twitter:card" content="summary_large_image" /> | ||
{/* Attention : og:image does not accept SVG; It must be an absolute URL (https://xxx.png/jpg); */} | ||
{image && <meta property="og:image" content={image} />} | ||
{url && <meta property="og:url" content={url} />} | ||
{children} | ||
<link | ||
rel="alternate" | ||
hrefLang="en" | ||
href={websiteURL + pathname + '?lang=en'} | ||
/> | ||
<link | ||
rel="alternate" | ||
hrefLang="fr" | ||
href={websiteURL + pathname + '?lang=fr'} | ||
/> | ||
<link rel="alternate" hrefLang="x-default" href={websiteURL + pathname} /> | ||
</Helmet> | ||
) | ||
} |
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
Oops, something went wrong.