Skip to content

Commit 559a4cc

Browse files
committed
Retire /certified-nodes/ in favor of pre-filtered /integrations/
1 parent fb27a82 commit 559a4cc

6 files changed

Lines changed: 8 additions & 93 deletions

File tree

src/_data/certifiedNodes.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/_data/features.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@
6060
"imageFolder": "../images/pictograms/",
6161
"imageFile": "certified-nodes_blue.png",
6262
"imageAlt": " certifying badge.",
63-
"content": "Our curated collection of certified nodes, ensuring top-notch quality, security, and support. Explore our certified nodes on the <a href='/certified-nodes'>Certified Nodes Page</a> and benefit from a robust ecosystem while maintaining operational reliability."
63+
"content": "Our curated collection of certified nodes, ensuring top-notch quality, security, and support. <a href='/integrations/?certified=1'>Explore our certified nodes</a> and benefit from a robust ecosystem while maintaining operational reliability."
6464
}
6565
]

src/_data/integrations.js

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const EleventyFetch = require("@11ty/eleventy-fetch");
2-
const certifiedNodes = require("./certifiedNodes");
32

43
module.exports = async () => {
54
console.log("Loading Integrations...");
@@ -12,44 +11,26 @@ module.exports = async () => {
1211
type: "json"
1312
});
1413

15-
// Get certified nodes first
16-
const nodes = await certifiedNodes();
17-
const ffNodesMap = nodes.reduce((acc, node) => {
18-
acc[node.id] = node;
19-
return acc;
20-
}, {});
21-
2214
// Sort by weekly downloads and get top 50 nodes
2315
const topNodes = response.catalogue
2416
.sort((a, b) => b.downloads.week - a.downloads.week)
2517
.slice(0, 50); // Limit to top 50 downloaded nodes
2618

27-
// Create a map of top nodes by ID for quick lookup
2819
const topNodesMap = topNodes.reduce((acc, node) => {
2920
acc[node._id] = node;
3021
return acc;
3122
}, {});
3223

33-
// Merge: ensure all certified nodes are included
34-
// Add any certified nodes that aren't in the top 50
35-
const certifiedNodeIds = Object.keys(ffNodesMap);
36-
certifiedNodeIds.forEach(certifiedId => {
37-
if (!topNodesMap[certifiedId]) {
38-
// Find the certified node in the full catalogue
39-
const certifiedNode = response.catalogue.find(n => n._id === certifiedId);
40-
if (certifiedNode) {
41-
topNodes.push(certifiedNode);
42-
}
24+
// Ensure all certified nodes are included even if outside the top 50.
25+
// The ff-integrations API already marks them with ffCertified: true.
26+
response.catalogue.forEach(node => {
27+
if (node.ffCertified && !topNodesMap[node._id]) {
28+
topNodes.push(node);
4329
}
4430
});
4531

4632
const data = Promise.all(
4733
topNodes.map(async (node) => {
48-
// Mark FlowFuse certified nodes
49-
if (ffNodesMap[node._id]) {
50-
node.ffCertified = true;
51-
}
52-
5334
// Ensure categories exist
5435
if (!node.categories) {
5536
node.categories = [];

src/_includes/certified/template.njk

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/certified-nodes.njk

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/redirects.njk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,5 @@ eleventyExcludeFromCollections: true
134134
/handbook/development/releases/dashboard-2/ /handbook/engineering/releases/dashboard-2/
135135
/handbook/development/releases/process/ /handbook/engineering/releases/process/
136136
/handbook/development/releases/digital-ocean/ /handbook/engineering/releases/digital-ocean/
137+
/certified-nodes/ /integrations/?certified=1 301
138+
/certified-nodes/* /integrations/?certified=1 301

0 commit comments

Comments
 (0)