@codesinger0/shared-components 1.1.73 → 1.1.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/SEO.jsx +55 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Helmet } from 'react-helmet-async';
|
|
3
|
+
|
|
4
|
+
const SEO = ({
|
|
5
|
+
title,
|
|
6
|
+
description,
|
|
7
|
+
image,
|
|
8
|
+
url,
|
|
9
|
+
siteName,
|
|
10
|
+
type = 'website',
|
|
11
|
+
article = false,
|
|
12
|
+
publishedTime,
|
|
13
|
+
modifiedTime,
|
|
14
|
+
}) => {
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<Helmet>
|
|
18
|
+
{/* Standard Meta Tags */}
|
|
19
|
+
<title>{title}</title>
|
|
20
|
+
<meta name="description" content={description} />
|
|
21
|
+
|
|
22
|
+
{/* Open Graph Meta Tags */}
|
|
23
|
+
<meta property="og:locale" content="he_IL" />
|
|
24
|
+
<meta property="og:type" content={article ? 'article' : type} />
|
|
25
|
+
<meta property="og:title" content={title} />
|
|
26
|
+
<meta property="og:description" content={description} />
|
|
27
|
+
<meta property="og:url" content={url} />
|
|
28
|
+
<meta property="og:site_name" content={siteName} />
|
|
29
|
+
<meta property="og:image" content={image} />
|
|
30
|
+
<meta property="og:image:width" content="512" />
|
|
31
|
+
<meta property="og:image:height" content="512" />
|
|
32
|
+
<meta property="og:image:alt" content={title} />
|
|
33
|
+
|
|
34
|
+
{/* Article specific meta tags */}
|
|
35
|
+
{article && publishedTime && (
|
|
36
|
+
<meta property="article:published_time" content={publishedTime} />
|
|
37
|
+
)}
|
|
38
|
+
{article && modifiedTime && (
|
|
39
|
+
<meta property="article:modified_time" content={modifiedTime} />
|
|
40
|
+
)}
|
|
41
|
+
|
|
42
|
+
{/* Twitter Card Meta Tags */}
|
|
43
|
+
<meta name="twitter:card" content="summary_large_image" />
|
|
44
|
+
<meta name="twitter:title" content={title} />
|
|
45
|
+
<meta name="twitter:description" content={description} />
|
|
46
|
+
<meta name="twitter:image" content={image} />
|
|
47
|
+
<meta name="twitter:image:alt" content={title} />
|
|
48
|
+
|
|
49
|
+
{/* Canonical URL */}
|
|
50
|
+
<link rel="canonical" href={url} />
|
|
51
|
+
</Helmet>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default SEO;
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ export { default as AccessibilityMenu } from './components/AccessibilityMenu'
|
|
|
24
24
|
export { default as FloatingWhatsAppButton } from './components/FloatingWhatsAppButton'
|
|
25
25
|
export { default as FullscreenCarousel } from './components/FullscreenCarousel'
|
|
26
26
|
export { default as UnderConstruction } from './components/UnderConstruction'
|
|
27
|
+
export { default as SEO } from './components/SEO'
|
|
27
28
|
|
|
28
29
|
// Modals
|
|
29
30
|
export { default as ItemDetailsModal } from './components/modals/ItemDetailsModal'
|