Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: DOC-1316 #3458

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Loading