@redpanda-data/docs-extensions-and-macros 3.5.6 → 3.5.8

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.
@@ -203,7 +203,7 @@ function generateIndex (playbook, contentCatalog, { indexLatestOnly = false, exc
203
203
  indexItem.deployment = deployment;
204
204
  indexItem.type = 'Lab';
205
205
  indexItem.interactive = false;
206
- indexItem._tags = ['labs'];
206
+ indexItem._tags = [tag];
207
207
  }
208
208
  algolia[cname][version].push(indexItem)
209
209
  algoliaCount++
@@ -4,7 +4,7 @@ module.exports.register = function ({ config }) {
4
4
  const logger = this.getLogger('related-labs-extension');
5
5
 
6
6
  this.on('documentsConverted', async ({ contentCatalog, siteCatalog }) => {
7
- const docs = contentCatalog.findBy({ component: 'ROOT', family: 'page' });
7
+ const docs = contentCatalog.findBy({ family: 'page' });
8
8
  docs.forEach((docPage) => {
9
9
  const relatedLabs = []
10
10
  const sourceAttributes = docPage.asciidoc.attributes
@@ -31,7 +31,7 @@ function findRelated(labPage, sourceCategoryList, sourceDeploymentType, logger)
31
31
  const targetCategoryList = pageCategories.split(',').map(c => c.trim());
32
32
  const targetDeploymentType = getDeploymentType(targetAttributes)
33
33
  const categoryMatch = hasMatchingCategory(sourceCategoryList, targetCategoryList)
34
- if (categoryMatch && (!targetDeploymentType ||sourceDeploymentType === targetDeploymentType || targetDeploymentType === 'Docker')) {
34
+ if (categoryMatch && (!targetDeploymentType ||sourceDeploymentType === targetDeploymentType || (targetDeploymentType === 'Docker' && !sourceDeploymentType))) {
35
35
  return {
36
36
  title: labPage.asciidoc.doctitle,
37
37
  url: labPage.pub.url,
@@ -45,7 +45,8 @@ function getDeploymentType (attributes) {
45
45
  return attributes['env-kubernetes'] ? 'Kubernetes'
46
46
  : attributes['env-linux'] ? 'Linux'
47
47
  : attributes['env-docker'] ? 'Docker'
48
- : attributes.cloud ? 'Redpanda Cloud' : ''
48
+ : attributes['env-cloud'] ? 'Redpanda Cloud'
49
+ : attributes['page-cloud'] ? 'Redpanda Cloud' : ''
49
50
  }
50
51
 
51
52
  function hasMatchingCategory (sourcePageCategories, targetPageCategories) {
@@ -28,13 +28,12 @@ module.exports.register = function () {
28
28
  const redpandaConsoleVersionRegex = /(\$\{REDPANDA_CONSOLE_VERSION[^\}]*\})/g;
29
29
  let fullVersion = attributes['full-version'] ? sanitizeAttributeValue(attributes['full-version']) : '';
30
30
  const latestConsoleVersion = attributes['latest-console-version'] ? sanitizeAttributeValue(attributes['latest-console-version']) : '';
31
-
32
- if (attributes['page-component-version-is-prerelease'] === 'true') {
31
+ if (attributes['page-component-version-is-prerelease']) {
33
32
  fullVersion = attributes['redpanda-beta-version'] ? sanitizeAttributeValue(attributes['redpanda-beta-version']) : fullVersion;
34
33
  }
35
-
36
34
  contentString = contentString.replace(redpandaVersionRegex, fullVersion);
37
35
  contentString = contentString.replace(redpandaConsoleVersionRegex, latestConsoleVersion);
36
+ modified = true;
38
37
  }
39
38
 
40
39
  const result = contentString.replace(/\{([\p{Alpha}\d_][\p{Alpha}\d_-]*)\}/gu, (match, name) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redpanda-data/docs-extensions-and-macros",
3
- "version": "3.5.6",
3
+ "version": "3.5.8",
4
4
  "description": "Antora extensions and macros developed for Redpanda documentation.",
5
5
  "keywords": [
6
6
  "antora",