@salesforcedevs/docs-components 1.3.108-seo-fix1 → 1.3.108-seo-fix2
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
|
@@ -694,8 +694,14 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
694
694
|
const docId = this.pageReference.docId;
|
|
695
695
|
|
|
696
696
|
// SEO fix:
|
|
697
|
-
// Condition is to find
|
|
698
|
-
|
|
697
|
+
// Condition is to find a docId which includes version id,
|
|
698
|
+
// these docs are always considered as old and shpuld not be indexed including the preview docs.
|
|
699
|
+
if (
|
|
700
|
+
headTag.length &&
|
|
701
|
+
docId?.includes(versionId) &&
|
|
702
|
+
// eslint-disable-next-line @lwc/lwc/no-document-query
|
|
703
|
+
!document.querySelector('meta[name="robots"]')
|
|
704
|
+
) {
|
|
699
705
|
const robotsMeta = document.createElement("meta");
|
|
700
706
|
robotsMeta.setAttribute("name", "robots");
|
|
701
707
|
robotsMeta.setAttribute("content", "noindex, follow");
|