@salesforcedevs/docs-components 0.56.2-seo-test6 → 0.56.2-seo-test7

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": "0.56.2-seo-test6",
3
+ "version": "0.56.2-seo-test7",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -586,7 +586,7 @@ export default class AmfReference extends LightningElement {
586
586
  referenceId,
587
587
  type,
588
588
  topic,
589
- label
589
+ topic.label
590
590
  );
591
591
  return {
592
592
  label: topic.label,
@@ -1077,6 +1077,18 @@ export default class AmfReference extends LightningElement {
1077
1077
  invalidTopicReferenceUrl = previousRefUrlInSession;
1078
1078
  }
1079
1079
  }
1080
+ if (!invalidTopicReferenceUrl) {
1081
+ const referenceUrl = window.location.href;
1082
+ const referenceMeta =
1083
+ this.getMarkdownReferenceMeta(referenceUrl);
1084
+ const selectedItemRefId =
1085
+ this.getReferenceIdFromUrl(referenceUrl);
1086
+ const referenceDetails = this.getRefDetailsForGivenTopicMeta(
1087
+ selectedItemRefId,
1088
+ referenceMeta
1089
+ );
1090
+ this.updateNavTitleMetaTag(referenceDetails.topicTitle);
1091
+ }
1080
1092
  this.loadMarkdownBasedReference(invalidTopicReferenceUrl);
1081
1093
  }
1082
1094
  }
@@ -1102,7 +1114,6 @@ export default class AmfReference extends LightningElement {
1102
1114
 
1103
1115
  private loadMarkdownBasedReference(referenceUrl?: string): void {
1104
1116
  let referenceId = "";
1105
- let topicTitle;
1106
1117
  const currentUrl = window.location.href;
1107
1118
  if (this.isProjectRootPath()) {
1108
1119
  /**
@@ -1134,7 +1145,6 @@ export default class AmfReference extends LightningElement {
1134
1145
  referenceMeta
1135
1146
  );
1136
1147
  const selectedItemUrl = referenceDetails?.referenceUrl;
1137
- topicTitle = referenceDetails?.topicTitle;
1138
1148
  if (!selectedItemUrl) {
1139
1149
  referenceId = this.getReferenceIdFromUrl(referenceUrl);
1140
1150
  }
@@ -1147,7 +1157,6 @@ export default class AmfReference extends LightningElement {
1147
1157
  const childrenItems = amfConfig.topic.children;
1148
1158
  if (childrenItems.length > 0) {
1149
1159
  redirectReferenceUrl = childrenItems[0].link.href;
1150
- topicTitle = childrenItems[0].label;
1151
1160
  }
1152
1161
  }
1153
1162
  if (redirectReferenceUrl) {
@@ -1161,7 +1170,6 @@ export default class AmfReference extends LightningElement {
1161
1170
  }
1162
1171
  }
1163
1172
 
1164
- this.updateNavTitleMetaTag(topicTitle);
1165
1173
  this.versions = this.getVersions();
1166
1174
 
1167
1175
  this.updateDocPhase();