@salesforcedevs/docs-components 1.3.55-seo-test3 → 1.3.55-seo-test4
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
|
@@ -676,14 +676,16 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
|
|
679
|
+
// eslint-disable-next-line @lwc/lwc/no-document-query
|
|
679
680
|
const headTag = document.getElementsByTagName("head");
|
|
680
681
|
// this checks if the selected version is not the latest version,
|
|
681
|
-
// then it adds the noindex, follow meta tag to the
|
|
682
|
+
// then it adds the noindex, follow meta tag to the non-latest version pages.
|
|
683
|
+
// assumption is that first version in the availableVersions array is the latest.
|
|
682
684
|
if (
|
|
683
685
|
headTag.length &&
|
|
684
686
|
this.version &&
|
|
685
687
|
this.availableVersions.length &&
|
|
686
|
-
this.version.id
|
|
688
|
+
this.version.id !== this.availableVersions[0].id
|
|
687
689
|
) {
|
|
688
690
|
const robotsNoFollowMeta = document.createElement("meta");
|
|
689
691
|
robotsNoFollowMeta.setAttribute("name", "robots");
|