@julseb-lib/react 0.0.96 → 0.0.97

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.
@@ -16,6 +16,8 @@ import type { ILibMeta } from "./types"
16
16
  * @param {string} [props.cover] - Open Graph image URL.
17
17
  * @param {string} [props.siteName] - Open Graph site name.
18
18
  * @param {string} [props.language] - Document language (used for <html lang=""> and og:locale).
19
+ * @param {string} [props.url] - Canonical URL for the page.
20
+ * @param {string} [props.email] - Contact email for the page.
19
21
  * @returns {JSX.Element} The rendered meta tags.
20
22
  *
21
23
  * @see https://documentation-components-react.vercel.app/components/meta
@@ -30,6 +32,8 @@ import type { ILibMeta } from "./types"
30
32
  * cover="/cover.png"
31
33
  * siteName="My Site"
32
34
  * language="en"
35
+ * url="https://mysite.com"
36
+ * email="me@mysite.com"
33
37
  * />
34
38
  */
35
39
  export const Meta: FC<ILibMeta> = ({
@@ -43,27 +47,50 @@ export const Meta: FC<ILibMeta> = ({
43
47
  cover,
44
48
  siteName,
45
49
  language,
50
+ url,
51
+ email,
46
52
  }) => {
47
53
  return (
48
54
  <>
49
55
  <title>{title}</title>
50
- <meta content="IE=edge" httpEquiv="X-UA-Compatible" />
56
+ <meta httpEquiv="Content-Type" content="text/html;charset=UTF-8" />
51
57
  <meta
52
- content="width=device-width, initial-scale=1"
53
58
  name="viewport"
59
+ content="width=device-width, initial-scale=1.0"
54
60
  />
55
- {children && children}
56
- {favicon && <link rel="icon" href={favicon} />}
57
- {description && <meta name="description" content={description} />}
58
- {keywords && (
59
- <meta name="keywords" content={keywords?.join(", ")} />
60
- )}
61
- {author && <meta name="author" content={author} />}
61
+ <meta name="description" content={description} />
62
+ <link rel="shortcut icon" href={favicon} type="image/x-icon" />
63
+ <link rel="icon" href={favicon} />
64
+ <meta name="author" content={author} />
65
+ <meta name="keywords" content={keywords?.join(",")} />
66
+
67
+ <meta name="application-name" content={siteName} />
68
+ <meta name="referrer" content="origin" />
69
+ <meta name="creator" content={author} />
70
+ <meta name="publisher" content={author} />
71
+ <meta name="category" content={type} />
72
+
62
73
  <meta property="og:title" content={title} />
63
- {type && <meta property="og:type" content={type} />}
64
- {cover && <meta property="og:image" content={cover} />}
65
- {siteName && <meta property="og:site_name" content={siteName} />}
66
- {language && <meta property="og:locale" content={language} />}
74
+ <meta property="og:description" content={description} />
75
+ <meta property="og:type" content={type} />
76
+ <meta property="og:image" content={cover} />
77
+ <meta property="og:site_name" content={siteName} />
78
+ <meta property="og:locale" content={language} />
79
+ <meta property="og:url" content={url} />
80
+ <meta property="og:site_name" content={siteName} />
81
+ <meta property="og:locale" content={language} />
82
+ <meta property="og:image" content={cover} />
83
+ <meta property="og:email" content={email} />
84
+ <meta property="og:type" content={type} />
85
+
86
+ <meta name="twitter:card" content="summary" />
87
+ <meta name="twitter:site" content={url} />
88
+ <meta name="twitter:creator" content={author} />
89
+ <meta name="twitter:title" content={siteName} />
90
+ <meta name="twitter:description" content={description} />
91
+ <meta name="twitter:image" content={cover} />
92
+
93
+ {children}
67
94
  </>
68
95
  )
69
96
  }
@@ -10,5 +10,7 @@ export interface ILibMeta {
10
10
  cover?: string
11
11
  siteName?: string
12
12
  language?: string
13
+ url?: string
14
+ email?: string
13
15
  children?: ReactChildren
14
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@julseb-lib/react",
3
- "version": "0.0.96",
3
+ "version": "0.0.97",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "scripts": {