added Meta component
This commit is contained in:
1 parent
85439ced56
commit
3ca52d6903
2 files changed
+58
No files matched your search
@@ -0,0 +1,35 @@
|
|||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
export const Meta = ({ meta }) => (
|
||||||
|
<>
|
||||||
|
{/* Search Engine */}
|
||||||
|
<meta name="description" content={meta.description} />
|
||||||
|
<meta name="image" content={meta.image} />
|
||||||
|
|
||||||
|
{/* Schema.org for Google */}
|
||||||
|
<meta itemprop="name" content={meta.title} />
|
||||||
|
<meta itemprop="description" content={meta.description} />
|
||||||
|
<meta itemprop="image" content={meta.image} />
|
||||||
|
|
||||||
|
{/* Open Graph general (Facebook, Pinterest & Google+) */}
|
||||||
|
<meta property="og:title" content={meta.title} />
|
||||||
|
<meta property="og:description" content={meta.description} />
|
||||||
|
<meta property="og:image" content={meta.image} />
|
||||||
|
<meta property="og:image:width" content={meta.imageWidth} />
|
||||||
|
<meta property="og:image:height" content={meta.imageHeight} />
|
||||||
|
<meta property="og:url" content={meta.url} />
|
||||||
|
<meta property="og:site_name" content={meta.siteName} />
|
||||||
|
<meta property="og:locale" content={meta.locale} />
|
||||||
|
<meta property="og:type" content={meta.type} />
|
||||||
|
|
||||||
|
{/* Twitter */}
|
||||||
|
<meta name="twitter:card" content={meta.twitterCard} />
|
||||||
|
<meta name="twitter:title" content={meta.title} />
|
||||||
|
<meta name="twitter:description" content={meta.description} />
|
||||||
|
<meta name="twitter:image:src" content={meta.image} />
|
||||||
|
<meta name="twitter:domain" content={meta.domain} />
|
||||||
|
<meta name="twitter:url" content={meta.url} />
|
||||||
|
<meta name="twitter:site" content={meta.twitterSite} />
|
||||||
|
<meta name="twitter:creator" content={meta.twitterCreator} />
|
||||||
|
</>
|
||||||
|
)
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
export function meta(props) {
|
||||||
|
const path = props.url || '/'
|
||||||
|
const url = `https://art.shlisselburg.org${path}`
|
||||||
|
|
||||||
|
return {
|
||||||
|
title: 'Шлиссельбургская ДХШ',
|
||||||
|
description: 'Сайт Шлиссельбургской художественной школы',
|
||||||
|
image: 'https://art.shlisselburg.org/entrance.jpg',
|
||||||
|
imageWidth: 1200,
|
||||||
|
imageHeight: 630,
|
||||||
|
|
||||||
|
siteName: 'Шлиссельбургская Детская Художественная Школа',
|
||||||
|
locale: 'ru_RU',
|
||||||
|
type: 'website',
|
||||||
|
domain: 'art.shlisselburg.org',
|
||||||
|
twitterCard: 'summary_large_image',
|
||||||
|
twitterSite: '@',
|
||||||
|
twitterCreator: '@tmshv',
|
||||||
|
|
||||||
|
...props,
|
||||||
|
url,
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user