@salesforcedevs/docs-components 1.3.73 → 1.3.74
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/docs-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.74",
|
|
4
4
|
"description": "Docs Lightning web components for DSC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@types/lodash.orderby": "^4.6.7",
|
|
25
25
|
"@types/lodash.uniqby": "^4.7.7"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "12c8b9df58fc546deacc080ddaf78e092b31295c"
|
|
28
28
|
}
|
|
@@ -685,5 +685,30 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
685
685
|
);
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
|
+
|
|
689
|
+
this.addNoIndexMetaForOlderDocVersions();
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* Method adds noindex, follow meta tag to the older Couch DB doc pages.
|
|
694
|
+
* Fixes W-12547462.
|
|
695
|
+
*/
|
|
696
|
+
private addNoIndexMetaForOlderDocVersions() {
|
|
697
|
+
// eslint-disable-next-line @lwc/lwc/no-document-query
|
|
698
|
+
const headTag = document.getElementsByTagName("head");
|
|
699
|
+
// this checks if the selected version is not the latest version,
|
|
700
|
+
// then it adds the noindex, follow meta tag to the older version pages.
|
|
701
|
+
// assumption is that first version in the availableVersions array is the latest.
|
|
702
|
+
if (
|
|
703
|
+
headTag.length &&
|
|
704
|
+
this.version &&
|
|
705
|
+
this.availableVersions.length &&
|
|
706
|
+
this.version.id !== this.availableVersions[0].id
|
|
707
|
+
) {
|
|
708
|
+
const robotsMeta = document.createElement("meta");
|
|
709
|
+
robotsMeta.setAttribute("name", "robots");
|
|
710
|
+
robotsMeta.setAttribute("content", "noindex, follow");
|
|
711
|
+
headTag[0].appendChild(robotsMeta);
|
|
712
|
+
}
|
|
688
713
|
}
|
|
689
714
|
}
|