@salesforcedevs/docs-components 1.3.209-tag1-alpha → 1.3.209-tag4-alpha
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/package.json
CHANGED
|
@@ -1344,14 +1344,32 @@ export default class AmfReference extends LightningElement {
|
|
|
1344
1344
|
*
|
|
1345
1345
|
*/
|
|
1346
1346
|
// eslint-disable-next-line @lwc/lwc/no-document-query
|
|
1347
|
-
|
|
1347
|
+
let coveoTitleMetaTag = document.querySelector(
|
|
1348
1348
|
'meta[name="coveo-search-title"]'
|
|
1349
1349
|
);
|
|
1350
|
-
if (coveoTitleMetaTag
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1350
|
+
if (!coveoTitleMetaTag) {
|
|
1351
|
+
coveoTitleMetaTag = document.createElement("meta");
|
|
1352
|
+
coveoTitleMetaTag.setAttribute("name", "coveo-search-title");
|
|
1353
|
+
// eslint-disable-next-line @lwc/lwc/no-document-query
|
|
1354
|
+
document
|
|
1355
|
+
.getElementsByTagName("head")[0]
|
|
1356
|
+
.appendChild(coveoTitleMetaTag);
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
if (titleTag) {
|
|
1360
|
+
let titleTagValue = titleTag.textContent || "";
|
|
1361
|
+
const titleTagSectionValues: string[] =
|
|
1362
|
+
titleTagValue?.split(TITLE_SEPARATOR);
|
|
1363
|
+
if (titleTagSectionValues) {
|
|
1364
|
+
if (titleTagSectionValues.length <= 3) {
|
|
1365
|
+
titleTagValue = navTitle + TITLE_SEPARATOR + titleTagValue;
|
|
1366
|
+
} else {
|
|
1367
|
+
titleTagSectionValues[0] = navTitle;
|
|
1368
|
+
titleTagValue = titleTagSectionValues.join(TITLE_SEPARATOR);
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
titleTag.textContent = titleTagValue;
|
|
1372
|
+
coveoTitleMetaTag.setAttribute("content", titleTagValue);
|
|
1355
1373
|
}
|
|
1356
1374
|
}
|
|
1357
1375
|
|