@pixelated-tech/components 3.3.2 → 3.3.3
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.
|
@@ -106,6 +106,13 @@ export function getAccordionMenuData(myRoutes) {
|
|
|
106
106
|
return menuItems;
|
|
107
107
|
}
|
|
108
108
|
export function generateMetaTags(props) {
|
|
109
|
-
const { title, description, keywords,
|
|
109
|
+
const { title, description, keywords, origin, url, site_name: prop_site_name, email: prop_email, image: prop_image, image_height: prop_image_height, image_width: prop_image_width, favicon: prop_favicon, siteInfo } = props;
|
|
110
|
+
// Use props if provided, otherwise fall back to siteInfo
|
|
111
|
+
const site_name = prop_site_name || siteInfo?.name;
|
|
112
|
+
const email = prop_email || siteInfo?.email;
|
|
113
|
+
const image = prop_image || siteInfo?.image;
|
|
114
|
+
const image_height = prop_image_height || siteInfo?.image_height;
|
|
115
|
+
const image_width = prop_image_width || siteInfo?.image_width;
|
|
116
|
+
const favicon = prop_favicon || siteInfo?.favicon;
|
|
110
117
|
return (_jsxs(_Fragment, { children: [_jsx("title", { children: title }), _jsx("meta", { charSet: "UTF-8" }), _jsx("meta", { httpEquiv: "content-type", content: "text/html; charset=UTF-8" }), _jsx("meta", { httpEquiv: 'Expires', content: '0' }), _jsx("meta", { httpEquiv: 'Pragma', content: 'no-cache' }), _jsx("meta", { httpEquiv: 'Cache-Control', content: 'no-cache' }), _jsx("meta", { name: "application-name", content: site_name }), _jsx("meta", { name: "author", content: site_name + ", " + email }), _jsx("meta", { name: 'copyright', content: site_name }), _jsx("meta", { name: "creator", content: site_name }), _jsx("meta", { name: "description", content: description }), _jsx("meta", { name: "keywords", content: keywords }), _jsx("meta", { name: 'language', content: 'EN' }), _jsx("meta", { name: 'owner', content: site_name }), _jsx("meta", { name: "publisher", content: site_name }), _jsx("meta", { name: 'rating', content: 'General' }), _jsx("meta", { name: 'reply-to', content: email }), _jsx("meta", { name: "robots", content: "index, follow" }), _jsx("meta", { name: 'url', content: url }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1.0, shrink-to-fit=no" }), _jsx("meta", { property: "og:description", content: description }), _jsx("meta", { property: 'og:email', content: email }), _jsx("meta", { property: "og:image", content: image }), _jsx("meta", { property: "og:image:height", content: image_height }), _jsx("meta", { property: "og:image:width", content: image_width }), _jsx("meta", { property: "og:locale", content: "en_US" }), _jsx("meta", { property: "og:site_name", content: site_name }), _jsx("meta", { property: "og:title", content: title }), _jsx("meta", { property: "og:type", content: "website" }), _jsx("meta", { property: "og:url", content: url }), _jsx("meta", { itemProp: "name", content: site_name }), _jsx("meta", { itemProp: "url", content: url }), _jsx("meta", { itemProp: "description", content: description }), _jsx("meta", { itemProp: "thumbnailUrl", content: image }), _jsx("meta", { property: "twitter:domain", content: new URL(origin).hostname }), _jsx("meta", { property: "twitter:url", content: url }), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), _jsx("meta", { name: "twitter:creator", content: site_name }), _jsx("meta", { name: "twitter:description", content: description }), _jsx("meta", { name: "twitter:image", content: image }), _jsx("meta", { name: "twitter:image:height", content: image_height }), _jsx("meta", { name: "twitter:image:width", content: image_width }), _jsx("meta", { name: "twitter:title", content: title }), _jsx("link", { rel: "author", href: origin }), _jsx("link", { rel: "canonical", href: url }), _jsx("link", { rel: "icon", type: "image/x-icon", href: favicon }), _jsx("link", { rel: "shortcut icon", type: "image/x-icon", href: favicon }), _jsx("link", { rel: "manifest", href: "/manifest.webmanifest" }), _jsx("link", { rel: "preconnect", href: "https://images.ctfassets.net/" }), _jsx("link", { rel: "preconnect", href: "https://res.cloudinary.com/" }), _jsx("link", { rel: "preconnect", href: "https://farm2.static.flickr.com" }), _jsx("link", { rel: "preconnect", href: "https://farm6.static.flickr.com" }), _jsx("link", { rel: "preconnect", href: "https://farm8.static.flickr.com" }), _jsx("link", { rel: "preconnect", href: "https://farm66.static.flickr.com" })] }));
|
|
111
118
|
}
|
|
@@ -22,14 +22,22 @@ export type GenerateMetaTagsProps = {
|
|
|
22
22
|
title: string;
|
|
23
23
|
description: string;
|
|
24
24
|
keywords: string;
|
|
25
|
-
site_name: string;
|
|
26
|
-
email: string;
|
|
27
25
|
origin: string;
|
|
28
26
|
url: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
site_name?: string;
|
|
28
|
+
email?: string;
|
|
29
|
+
image?: string;
|
|
30
|
+
image_height?: string;
|
|
31
|
+
image_width?: string;
|
|
32
|
+
favicon?: string;
|
|
33
|
+
siteInfo?: {
|
|
34
|
+
name?: string;
|
|
35
|
+
email?: string;
|
|
36
|
+
image?: string;
|
|
37
|
+
image_height?: string;
|
|
38
|
+
image_width?: string;
|
|
39
|
+
favicon?: string;
|
|
40
|
+
};
|
|
33
41
|
};
|
|
34
42
|
export declare function generateMetaTags(props: GenerateMetaTagsProps): import("react/jsx-runtime").JSX.Element;
|
|
35
43
|
//# sourceMappingURL=metadata.functions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.functions.d.ts","sourceRoot":"","sources":["../../../../src/components/seo/metadata.functions.tsx"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,EAAE,WAAW,SAAI,EAAE,eAAe,GAAE,MAAM,EAAO,YA0B7G;AAED,MAAM,MAAM,KAAK,GAAG;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACnB,CAAA;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAgBpE;AAED,w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