From 79908afa4dff9677f1d446232208f00dad380fe2 Mon Sep 17 00:00:00 2001 From: egrace479 Date: Wed, 13 May 2026 14:55:39 -0400 Subject: [PATCH 1/7] Move code platform definition to config Add functions to define API URLs and ribbon values based on config-defined platform --- README.md | 1 + index.html | 14 +++++----- main.js | 52 ++++++++++++++++++++++-------------- public/config.yaml | 4 +++ scripts/export-tags.js | 13 +++++---- scripts/fetch-releases.js | 6 +++-- src/defineApiUrls.js | 34 +++++++++++++++++++++++ src/defineRibbonVals.js | 40 +++++++++++++++++++++++++++ src/validateConfig.js | 5 ++++ tests/validateConfig.test.js | 12 +++++++++ 10 files changed, 146 insertions(+), 35 deletions(-) create mode 100644 src/defineApiUrls.js create mode 100644 src/defineRibbonVals.js diff --git a/README.md b/README.md index 0c33cd1..231d847 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ Welcome to your new catalog repo! The primary way to personalize this catalog is * `COLORS.tag`: Tag background color * **API & Behavior Settings:** + * `PLATFORM`: Coding platform used (default: 'github', Codeberg and GitLab support in development) * `API_BASE_URL`: Hugging Face API base URL (default: `"https://huggingface.co/api/"`) * `REFRESH_INTERVAL_DAYS`: Number of days to consider an item "new" (default: `30`) * `ADDITIONAL_REPOS`: Array of forked or non-org GitHub repositories to include, formatted `/` (non-forks are included by default). Use `[]` if there are none you wish to include diff --git a/index.html b/index.html index d18f913..7e96d4a 100644 --- a/index.html +++ b/index.html @@ -23,20 +23,18 @@ - - +