Skip to content

Conversation

@PavelKopecky
Copy link
Contributor

@PavelKopecky PavelKopecky commented Oct 30, 2025

Closes #833

I also added a single source for all the projects, it is now used in 5 places.

@coderabbitai
Copy link

coderabbitai bot commented Oct 30, 2025

Walkthrough

Adds a new JSON asset at src/assets/json/oss-cdn-projects.json containing metadata for multiple OSS CDN projects. Templates, components, and routes were refactored to consume that JSON: landing, OSS CDN list, per-project pages, proxy data cards, and the /oss-cdn/:name route (now guarded to return 404 for unknown names). Styles for proxy layout were adjusted. The sitemap middleware now includes links derived from the new JSON. A helper for computing 2x PNG image sources was added and various templates switched to using imgSrc/imgWidth/imgHeight from the JSON.

Suggested reviewers

  • MartinKolarik

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes out-of-scope changes: refactoring all OSS CDN projects into a unified data source (affecting 5 files beyond Atlas OS addition) and updating sponsor image paths. Consider splitting the PR: one commit for Atlas OS addition (#833) and another for the data consolidation refactoring and sponsor image updates.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add AtlasOS to custom endpoints' is partially related—it mentions Atlas OS, but doesn't capture the main change: creating a unified data source for OSS CDN projects used across 5 places.
Description check ✅ Passed The description mentions both adding AtlasOS and consolidating project data into a single source, which aligns with the actual changes made in the PR.
Linked Issues check ✅ Passed The PR successfully adds Atlas OS with correct title, apiCdnName, link, and description. It also implements 404 handling for /oss-cdn prefix as required by #833.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gh-833

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0600cf5 and dd07856.

📒 Files selected for processing (2)
  • src/assets/json/oss-cdn-projects.json (1 hunks)
  • src/views/components/landing-top.html (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/views/components/landing-top.html
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/assets/json/oss-cdn-projects.json

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/views/components/proxy-head.html (1)

7-7: Clarify the dual image yield intent.

The image is yielded twice - once inside the info-block (line 7) and once outside (line 20). While this might be intentional for different display contexts, the purpose isn't immediately clear from the code.

Also applies to: 20-20

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d8df35 and a96b95b.

⛔ Files ignored due to path filters (12)
  • src/assets/img/landing/new/endpoint1.png is excluded by !**/*.png
  • src/assets/img/landing/new/[email protected] is excluded by !**/*.png
  • src/assets/img/landing/new/endpoint2.png is excluded by !**/*.png
  • src/assets/img/landing/new/[email protected] is excluded by !**/*.png
  • src/assets/img/landing/new/endpoint3.png is excluded by !**/*.png
  • src/assets/img/landing/new/[email protected] is excluded by !**/*.png
  • src/assets/img/landing/new/[email protected] is excluded by !**/*.png
  • src/assets/img/landing/new/endpoint5.svg is excluded by !**/*.svg
  • src/assets/img/landing/new/endpoint6.svg is excluded by !**/*.svg
  • src/assets/img/landing/new/gcorelabs.svg is excluded by !**/*.svg
  • src/assets/img/proxy/atlas.svg is excluded by !**/*.svg
  • src/assets/img/proxy/[email protected] is excluded by !**/*.png
📒 Files selected for processing (8)
  • src/assets/json/oss-cdn-projects.json (1 hunks)
  • src/assets/less/pages/proxy.less (1 hunks)
  • src/routes/jsdelivr.js (2 hunks)
  • src/views/components/landing-bottom.html (3 hunks)
  • src/views/components/proxy-data-card.html (2 hunks)
  • src/views/components/proxy-head.html (1 hunks)
  • src/views/pages/_oss-cdn-project.html (4 hunks)
  • src/views/pages/oss-cdn.html (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{vue,ts,js}

⚙️ CodeRabbit configuration file

We use Nuxt with auto imports enabled. Don't warn about missing imports.

Files:

  • src/routes/jsdelivr.js
🧠 Learnings (3)
📓 Common learnings
Learnt from: PavelKopecky
PR: jsdelivr/www.jsdelivr.com#811
File: src/views/pages/globalping/_users.html:20-27
Timestamp: 2025-09-04T15:39:12.792Z
Learning: PavelKopecky prefers not to add alt attributes to images in HTML templates, even for accessibility purposes.
Learnt from: PavelKopecky
PR: jsdelivr/www.jsdelivr.com#811
File: src/assets/less/pages/globalping/users.less:45-59
Timestamp: 2025-09-14T10:00:21.267Z
Learning: PavelKopecky uses left/right positioning with equal values (e.g., left: 32px; right: 32px;) combined with max-width and margin: 0 auto for centering absolutely positioned elements, and prefers this approach over transform-based centering.
Learnt from: PavelKopecky
PR: jsdelivr/www.jsdelivr.com#814
File: src/views/pages/globalping/_networks.html:240-242
Timestamp: 2025-09-17T15:38:13.333Z
Learning: PavelKopecky prefers OTHER_NETWORKS_DISPLAYED = 12 (showing 6 neighbors on each side) for the "Explore other networks" section in the Globalping networks page, rather than 20 neighbors as might be suggested by spec examples.
📚 Learning: 2025-07-28T07:31:43.365Z
Learnt from: PavelKopecky
PR: jsdelivr/www.jsdelivr.com#802
File: src/views/pages/globalping/sponsors.html:345-351
Timestamp: 2025-07-28T07:31:43.365Z
Learning: In the jsDelivr website templating system (src/views/pages/globalping/sponsors.html and similar files), asset paths in imgSrc arrays use relative paths like `/img/globalping/sponsors/filename.svg` which are automatically prefixed with `{{shared.assetsHost}}` in the template. The build system handles mapping these paths to the actual asset locations in `src/assets/`, so the relative paths in the data don't need to match the filesystem structure exactly.

Applied to files:

  • src/views/components/proxy-data-card.html
  • src/views/pages/_oss-cdn-project.html
📚 Learning: 2025-06-30T15:52:04.874Z
Learnt from: xbpcb
PR: jsdelivr/www.jsdelivr.com#775
File: src/views/components/show-more-list.html:0-0
Timestamp: 2025-06-30T15:52:04.874Z
Learning: In RactiveJS, observers fire immediately by default when they are set up, unless explicitly configured with `{ init: false }` option. This means that when you call `this.observe('property', callback)`, the callback executes immediately with the current value of the property, ensuring proper initialization of dependent data.

Applied to files:

  • src/views/pages/_oss-cdn-project.html
🧬 Code graph analysis (1)
src/routes/jsdelivr.js (2)
src/middleware/open-graph/image/index.js (1)
  • data (180-180)
src/middleware/readme/index.js (1)
  • ctx (74-74)
🔇 Additional comments (1)
src/assets/json/oss-cdn-projects.json (1)

35-45: The atlas.svg file exists at src/assets/img/proxy/atlas.svg. The original concern is unfounded.

Likely an incorrect or invalid review comment.

@jimaek jimaek temporarily deployed to gh-833 - www.jsdelivr.com PR #835 November 11, 2025 07:53 — with Render Destroyed
@MartinKolarik MartinKolarik merged commit d409d71 into master Nov 11, 2025
2 checks passed
@MartinKolarik MartinKolarik deleted the gh-833 branch November 11, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Atlas OS

4 participants