@redpanda-data/docs-extensions-and-macros 3.5.7 → 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 = [
|
|
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({
|
|
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
|
|
48
|
+
: attributes['env-cloud'] ? 'Redpanda Cloud'
|
|
49
|
+
: attributes['page-cloud'] ? 'Redpanda Cloud' : ''
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
function hasMatchingCategory (sourcePageCategories, targetPageCategories) {
|