Skip to content

Commit

Permalink
chore: DOC-1316 (#3458)
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-cardenas-coding authored Jul 23, 2024
1 parent 8ad1468 commit a45e982
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const config = {
],
[
pluginPacksAndIntegrationsData,
{ repositories: ["Palette Registry", "Spectro Addon Repo", "Palette Community Registry"] },
{ repositories: ["Palette Registry", "Public Repo", "Spectro Addon Repo", "Palette Community Registry"] },
],
pluginImportFontAwesomeIcons,
function () {
Expand Down
11 changes: 11 additions & 0 deletions plugins/packs-integrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const mime = require("mime-types");
const { setTimeout } = require("timers/promises");
const BASE_URL = require("../static/scripts/constants.js").BASE_URL;
const fetch = require("node-fetch");
const excludeList = require("../static/packs-data/exclude_packs.json");
const { existsSync, promises, open, mkdirSync, writeFile, close, createWriteStream } = require("node:fs");
import logger from "@docusaurus/logger";

Expand Down Expand Up @@ -386,6 +387,16 @@ async function pluginPacksAndIntegrationsData(context, options) {
mkdirSync(dirname, { recursive: true });
}
let packDataArr = await fetchPackListItems("?limit=50", [], 0);

// Filter out the packs from the exclude list.
packDataArr = packDataArr.filter((pack) => {
if (excludeList.includes(pack.spec.name)) {
// Only uncomment if debugging is required
// logger.warn(`Pack ${pack.spec.name} is excluded from the list`);
return false;
}
return true;
});
logger.info("All production packs are identified and a list of packs to be fetched is prepared");
packDataArr = packDataArr.filter((pack) => {
return (
Expand Down
1 change: 1 addition & 0 deletions static/packs-data/exclude_packs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["palette-upgrader"]

0 comments on commit a45e982

Please sign in to comment.