@cntrl-site/sdk-nextjs 1.9.98 → 1.9.99

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.
@@ -15,7 +15,7 @@ const CNTRLHead = ({ meta, project, slug, siteUrl, fontsVault }) => {
15
15
  const parsedFonts = Object.assign(Object.assign({}, (typeof googleFonts === 'object' ? googleFonts : {})), (typeof adobeFonts === 'object' ? adobeFonts : {}));
16
16
  const customFonts = project.fonts.custom;
17
17
  const htmlHead = (0, html_react_parser_1.default)(project.html.head);
18
- const ffGenerator = new sdk_1.FontFaceGenerator([...customFonts, ...fontsVault]);
18
+ const ffGenerator = new sdk_1.FontFaceGenerator([...fontsVault, ...customFonts]);
19
19
  const links = Object.values(parsedFonts).map((value) => {
20
20
  var _a, _b;
21
21
  if (!value)
@@ -26,9 +26,9 @@ const CNTRLHead = ({ meta, project, slug, siteUrl, fontsVault }) => {
26
26
  return null;
27
27
  return ((0, jsx_runtime_1.jsx)("link", { rel: rel, href: href }, `link-${rel}-${href}`));
28
28
  });
29
- return ((0, jsx_runtime_1.jsxs)(head_1.default, { children: [(0, jsx_runtime_1.jsx)("title", { children: meta.title }), (0, jsx_runtime_1.jsx)("meta", { name: "description", content: meta.description }), (0, jsx_runtime_1.jsx)("meta", { name: "keywords", content: meta.keywords }), (0, jsx_runtime_1.jsx)("meta", { property: "og:title", content: meta.title }), (0, jsx_runtime_1.jsx)("meta", { property: "og:image", content: meta.opengraphThumbnail }), (0, jsx_runtime_1.jsx)("meta", { property: "og:description", content: meta.description }), (0, jsx_runtime_1.jsx)("meta", { property: "og:type", content: "website" }), canonicalUrl && (0, jsx_runtime_1.jsx)("link", { rel: "canonical", href: canonicalUrl }), canonicalUrl && (0, jsx_runtime_1.jsx)("meta", { property: "og:url", content: canonicalUrl }), (0, jsx_runtime_1.jsx)("meta", { name: "twitter:card", content: "summary_large_image" }), (0, jsx_runtime_1.jsx)("meta", { name: "twitter:title", content: meta.title }), (0, jsx_runtime_1.jsx)("meta", { name: "twitter:image", content: meta.opengraphThumbnail }), (0, jsx_runtime_1.jsx)("meta", { name: "twitter:description", content: meta.description }), (0, jsx_runtime_1.jsx)("meta", { name: "generator", content: "https://cntrl.site" }), (0, jsx_runtime_1.jsx)("link", { rel: "icon", href: meta.favicon }), customFonts.length > 0 && ((0, jsx_runtime_1.jsx)("style", { dangerouslySetInnerHTML: {
29
+ return ((0, jsx_runtime_1.jsxs)(head_1.default, { children: [(0, jsx_runtime_1.jsx)("title", { children: meta.title }), (0, jsx_runtime_1.jsx)("meta", { name: "description", content: meta.description }), (0, jsx_runtime_1.jsx)("meta", { name: "keywords", content: meta.keywords }), (0, jsx_runtime_1.jsx)("meta", { property: "og:title", content: meta.title }), (0, jsx_runtime_1.jsx)("meta", { property: "og:image", content: meta.opengraphThumbnail }), (0, jsx_runtime_1.jsx)("meta", { property: "og:description", content: meta.description }), (0, jsx_runtime_1.jsx)("meta", { property: "og:type", content: "website" }), canonicalUrl && (0, jsx_runtime_1.jsx)("link", { rel: "canonical", href: canonicalUrl }), canonicalUrl && (0, jsx_runtime_1.jsx)("meta", { property: "og:url", content: canonicalUrl }), (0, jsx_runtime_1.jsx)("meta", { name: "twitter:card", content: "summary_large_image" }), (0, jsx_runtime_1.jsx)("meta", { name: "twitter:title", content: meta.title }), (0, jsx_runtime_1.jsx)("meta", { name: "twitter:image", content: meta.opengraphThumbnail }), (0, jsx_runtime_1.jsx)("meta", { name: "twitter:description", content: meta.description }), (0, jsx_runtime_1.jsx)("meta", { name: "generator", content: "https://cntrl.site" }), (0, jsx_runtime_1.jsx)("link", { rel: "icon", href: meta.favicon }), (0, jsx_runtime_1.jsx)("style", { dangerouslySetInnerHTML: {
30
30
  __html: ffGenerator.generate()
31
- } })), links, htmlHead] }));
31
+ } }), links, htmlHead] }));
32
32
  };
33
33
  exports.CNTRLHead = CNTRLHead;
34
34
  function buildCanonicalUrl(host, slug) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk-nextjs",
3
- "version": "1.9.98",
3
+ "version": "1.9.99",
4
4
  "description": "SDK for Next.js",
5
5
  "author": "arsen@momdesign.nyc",
6
6
  "license": "MIT",
@@ -21,7 +21,7 @@ export const CNTRLHead: FC<Props> = ({ meta, project, slug, siteUrl, fontsVault
21
21
  };
22
22
  const customFonts = project.fonts.custom;
23
23
  const htmlHead = HTMLReactParser(project.html.head);
24
- const ffGenerator = new FontFaceGenerator([...customFonts, ...fontsVault]);
24
+ const ffGenerator = new FontFaceGenerator([...fontsVault, ...customFonts]);
25
25
  const links = Object.values(parsedFonts as ReturnType<typeof domToReact>).map((value) => {
26
26
  if (!value) return null;
27
27
  const rel = value?.rel || value.props?.rel;
@@ -48,13 +48,11 @@ export const CNTRLHead: FC<Props> = ({ meta, project, slug, siteUrl, fontsVault
48
48
  <meta name="twitter:description" content={meta.description} />
49
49
  <meta name="generator" content="https://cntrl.site" />
50
50
  <link rel="icon" href={meta.favicon} />
51
- {customFonts.length > 0 && (
52
- <style
53
- dangerouslySetInnerHTML={{
54
- __html: ffGenerator.generate()
55
- }}
56
- />
57
- )}
51
+ <style
52
+ dangerouslySetInnerHTML={{
53
+ __html: ffGenerator.generate()
54
+ }}
55
+ />
58
56
  {links}
59
57
  {htmlHead}
60
58