@anywayseo/tools 5.7.2 → 5.8.0
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/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/seo/index.d.ts +2 -1
- package/dist/components/seo/types.d.ts +4 -0
- package/dist/{index-Cl0ZvmOD.js → index-BSOCyFLF.js} +2 -1
- package/dist/{index-QmNh8L3Y.mjs → index-Bigf9jEx.mjs} +2 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../index-
|
|
3
|
+
const index = require("../index-BSOCyFLF.js");
|
|
4
4
|
const index$1 = require("../index-BrpyfyHr.js");
|
|
5
5
|
const index$2 = require("../index-DDg_PkD2.js");
|
|
6
6
|
const index$3 = require("../index-BNkvrBOj.js");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, b, c, n, o, d, B, e, C, r, q, F, f, g, G, h, i, j, p, H, I, L, N, s, P, S, k, T, l, t, m } from "../index-
|
|
1
|
+
import { A, a, b, c, n, o, d, B, e, C, r, q, F, f, g, G, h, i, j, p, H, I, L, N, s, P, S, k, T, l, t, m } from "../index-Bigf9jEx.mjs";
|
|
2
2
|
import { C as C2, a as a2, b as b2, L as L2, c as c2, R, S as S2, d as d2 } from "../index-CodGh8Sq.mjs";
|
|
3
3
|
import { H as H2, a as a3, b as b3, O, P as P2, U } from "../index-BEjKnOZA.mjs";
|
|
4
4
|
import { I as I2, L as L3 } from "../index-C3FKVt3V.mjs";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { ILocale, ISeo } from '../../types';
|
|
3
|
-
import { SeoItemGetter } from './types';
|
|
3
|
+
import { IHrefLang, SeoItemGetter } from './types';
|
|
4
4
|
type SeoProps = PropsWithChildren<{
|
|
5
5
|
title?: ISeo['title'] | SeoItemGetter;
|
|
6
6
|
description?: ISeo['description'] | SeoItemGetter;
|
|
7
7
|
lang?: ILocale['code'];
|
|
8
|
+
hrefLangs?: IHrefLang[];
|
|
8
9
|
}>;
|
|
9
10
|
declare const Seo: FC<SeoProps>;
|
|
10
11
|
export default Seo;
|
|
@@ -929,7 +929,7 @@ function replacePlaceholders(text, placeholders) {
|
|
|
929
929
|
});
|
|
930
930
|
return text;
|
|
931
931
|
}
|
|
932
|
-
const Seo = ({ children, title, description, lang }) => {
|
|
932
|
+
const Seo = ({ children, title, description, lang, hrefLangs = [] }) => {
|
|
933
933
|
const { metadata } = index.useSiteContext();
|
|
934
934
|
const { name: siteName, lang: defaultLang, seo } = metadata;
|
|
935
935
|
const { title: defaultTitle, description: defaultDescription } = seo;
|
|
@@ -952,6 +952,7 @@ const Seo = ({ children, title, description, lang }) => {
|
|
|
952
952
|
content: description ? typeof description === "string" ? replacePlaceholders(description, placeholders) : description(placeholders) : defaultDescription
|
|
953
953
|
}
|
|
954
954
|
),
|
|
955
|
+
hrefLangs.map(({ href, hrefLang }, index2) => /* @__PURE__ */ jsxRuntime.jsx("link", { rel: "alternate", hrefLang, href: `https://${siteName}${href}` }, index2)),
|
|
955
956
|
children
|
|
956
957
|
] });
|
|
957
958
|
};
|
|
@@ -928,7 +928,7 @@ function replacePlaceholders(text, placeholders) {
|
|
|
928
928
|
});
|
|
929
929
|
return text;
|
|
930
930
|
}
|
|
931
|
-
const Seo = ({ children, title, description, lang }) => {
|
|
931
|
+
const Seo = ({ children, title, description, lang, hrefLangs = [] }) => {
|
|
932
932
|
const { metadata } = useSiteContext();
|
|
933
933
|
const { name: siteName, lang: defaultLang, seo } = metadata;
|
|
934
934
|
const { title: defaultTitle, description: defaultDescription } = seo;
|
|
@@ -951,6 +951,7 @@ const Seo = ({ children, title, description, lang }) => {
|
|
|
951
951
|
content: description ? typeof description === "string" ? replacePlaceholders(description, placeholders) : description(placeholders) : defaultDescription
|
|
952
952
|
}
|
|
953
953
|
),
|
|
954
|
+
hrefLangs.map(({ href, hrefLang }, index) => /* @__PURE__ */ jsx("link", { rel: "alternate", hrefLang, href: `https://${siteName}${href}` }, index)),
|
|
954
955
|
children
|
|
955
956
|
] });
|
|
956
957
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-BSOCyFLF.js");
|
|
4
4
|
const index$1 = require("./index-BrpyfyHr.js");
|
|
5
5
|
const index$2 = require("./index-DDg_PkD2.js");
|
|
6
6
|
const index$3 = require("./index-BNkvrBOj.js");
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, b, c, n, o, d, B, e, C, r, q, F, f, g, G, h, i, j, p, H, I, L, N, s, P, S, k, T, l, t, m } from "./index-
|
|
1
|
+
import { A, a, b, c, n, o, d, B, e, C, r, q, F, f, g, G, h, i, j, p, H, I, L, N, s, P, S, k, T, l, t, m } from "./index-Bigf9jEx.mjs";
|
|
2
2
|
import { C as C2, a as a2, b as b2, L as L2, c as c2, R, S as S2, d as d2 } from "./index-CodGh8Sq.mjs";
|
|
3
3
|
import { H as H2, a as a3, b as b3, O, P as P2, U } from "./index-BEjKnOZA.mjs";
|
|
4
4
|
import { I as I2, L as L3, P as P3, S as S3, u, a as a4 } from "./index-C3FKVt3V.mjs";
|