@salesforcedevs/docs-components 1.3.54-alpha-1 → 1.3.55-seo-test1

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.54-alpha-1",
3
+ "version": "1.3.55-seo-test1",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -6,6 +6,7 @@
6
6
 
7
7
  @import "dxHelpers/text";
8
8
  @import "dxHelpers/reset";
9
+ @import "dxHelpers/card";
9
10
  @import "dxHelpers/table";
10
11
 
11
12
  .doc-content {
@@ -675,5 +675,19 @@ export default class DocXmlContent extends LightningElementWithState<{
675
675
  );
676
676
  }
677
677
  }
678
+
679
+ const headTag = document.getElementsByTagName('head');
680
+ // this checks if the selected version is not the latest version,
681
+ // then it adds the noindex, follow meta tag to the page
682
+ if (headTag.length
683
+ && this.version
684
+ && this.availableVersions.length
685
+ && this.version === this.availableVersions[0]
686
+ ) {
687
+ const robotsNoFollowMeta = document.createElement('meta');
688
+ robotsNoFollowMeta.setAttribute("name", "robots");
689
+ robotsNoFollowMeta.setAttribute("content","noindex, follow");
690
+ headTag[0].appendChild(robotsNoFollowMeta);
691
+ }
678
692
  }
679
693
  }