diff --git a/src/_data/certifiedNodes.js b/src/_data/certifiedNodes.js deleted file mode 100644 index 07ceced112..0000000000 --- a/src/_data/certifiedNodes.js +++ /dev/null @@ -1,22 +0,0 @@ -const EleventyFetch = require("@11ty/eleventy-fetch"); - -module.exports = async function() { - const url = 'https://catalog.flowfuse.com/catalogue.json'; - - const data = await EleventyFetch(url, { - duration: "4h", // save for 1 day - type: "json" // parse the JSON - }); - - const transformedData = data.modules.map(item => ({ - title: item.id.replace(/^(node-red-contrib-|node-red-node-|@flowfuse\/)/, '') - .split('-') - .map(word => word.replace(/^\w/, (c) => c.toUpperCase())) - .join(' '), - id: item.id, - url: item.url || `https://flows.nodered.org/node/${item.id}`, - description: item.description, - })); - - return transformedData; -}; \ No newline at end of file diff --git a/src/_data/features.json b/src/_data/features.json index ec3155a427..3a7421c16b 100644 --- a/src/_data/features.json +++ b/src/_data/features.json @@ -60,6 +60,6 @@ "imageFolder": "../images/pictograms/", "imageFile": "certified-nodes_blue.png", "imageAlt": " certifying badge.", - "content": "Our curated collection of certified nodes, ensuring top-notch quality, security, and support. Explore our certified nodes on the Certified Nodes Page and benefit from a robust ecosystem while maintaining operational reliability." + "content": "Our curated collection of certified nodes, ensuring top-notch quality, security, and support. Explore our certified nodes and benefit from a robust ecosystem while maintaining operational reliability." } ] diff --git a/src/_data/integrations.js b/src/_data/integrations.js index 41afc54c80..446c81e8c8 100644 --- a/src/_data/integrations.js +++ b/src/_data/integrations.js @@ -1,5 +1,4 @@ const EleventyFetch = require("@11ty/eleventy-fetch"); -const certifiedNodes = require("./certifiedNodes"); module.exports = async () => { console.log("Loading Integrations..."); @@ -12,44 +11,26 @@ module.exports = async () => { type: "json" }); - // Get certified nodes first - const nodes = await certifiedNodes(); - const ffNodesMap = nodes.reduce((acc, node) => { - acc[node.id] = node; - return acc; - }, {}); - // Sort by weekly downloads and get top 50 nodes const topNodes = response.catalogue .sort((a, b) => b.downloads.week - a.downloads.week) .slice(0, 50); // Limit to top 50 downloaded nodes - // Create a map of top nodes by ID for quick lookup const topNodesMap = topNodes.reduce((acc, node) => { acc[node._id] = node; return acc; }, {}); - // Merge: ensure all certified nodes are included - // Add any certified nodes that aren't in the top 50 - const certifiedNodeIds = Object.keys(ffNodesMap); - certifiedNodeIds.forEach(certifiedId => { - if (!topNodesMap[certifiedId]) { - // Find the certified node in the full catalogue - const certifiedNode = response.catalogue.find(n => n._id === certifiedId); - if (certifiedNode) { - topNodes.push(certifiedNode); - } + // Ensure all certified nodes are included even if outside the top 50. + // The ff-integrations API already marks them with ffCertified: true. + response.catalogue.forEach(node => { + if (node.ffCertified && !topNodesMap[node._id]) { + topNodes.push(node); } }); const data = Promise.all( topNodes.map(async (node) => { - // Mark FlowFuse certified nodes - if (ffNodesMap[node._id]) { - node.ffCertified = true; - } - // Ensure categories exist if (!node.categories) { node.categories = []; diff --git a/src/_includes/certified/template.njk b/src/_includes/certified/template.njk deleted file mode 100644 index c8c02deeb2..0000000000 --- a/src/_includes/certified/template.njk +++ /dev/null @@ -1,33 +0,0 @@ -
-
-
-

Certified Nodes

-
- -
-

- {{ description | safe }} -

-
- -
- {% include "blog/pagination.njk" %} -
diff --git a/src/certified-nodes.njk b/src/certified-nodes.njk deleted file mode 100644 index ae85aa1f9a..0000000000 --- a/src/certified-nodes.njk +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: nohero -pagination: - data: certifiedNodes - size: 24 - alias: certified -description: "Explore a curated selection of Node-RED modules that have undergone a rigorous certification process to meet the highest standards. Our certified nodes excel in three core pillars: Quality, Security, and Support." -meta: - title: Certified Nodes -category: all ---- - -{% include "certified/template.njk" %} diff --git a/src/redirects.njk b/src/redirects.njk index 96b275dd12..f607a851c2 100644 --- a/src/redirects.njk +++ b/src/redirects.njk @@ -134,3 +134,5 @@ eleventyExcludeFromCollections: true /handbook/development/releases/dashboard-2/ /handbook/engineering/releases/dashboard-2/ /handbook/development/releases/process/ /handbook/engineering/releases/process/ /handbook/development/releases/digital-ocean/ /handbook/engineering/releases/digital-ocean/ +/certified-nodes/ /integrations/?certified=1 301 +/certified-nodes/* /integrations/?certified=1 301