-
-
Notifications
You must be signed in to change notification settings - Fork 76
Add AtlasOS to custom endpoints #835
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
Conversation
WalkthroughAdds 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
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Comment |
There was a problem hiding this 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
⛔ Files ignored due to path filters (12)
src/assets/img/landing/new/endpoint1.pngis excluded by!**/*.pngsrc/assets/img/landing/new/[email protected]is excluded by!**/*.pngsrc/assets/img/landing/new/endpoint2.pngis excluded by!**/*.pngsrc/assets/img/landing/new/[email protected]is excluded by!**/*.pngsrc/assets/img/landing/new/endpoint3.pngis excluded by!**/*.pngsrc/assets/img/landing/new/[email protected]is excluded by!**/*.pngsrc/assets/img/landing/new/[email protected]is excluded by!**/*.pngsrc/assets/img/landing/new/endpoint5.svgis excluded by!**/*.svgsrc/assets/img/landing/new/endpoint6.svgis excluded by!**/*.svgsrc/assets/img/landing/new/gcorelabs.svgis excluded by!**/*.svgsrc/assets/img/proxy/atlas.svgis excluded by!**/*.svgsrc/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.htmlsrc/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 atsrc/assets/img/proxy/atlas.svg. The original concern is unfounded.Likely an incorrect or invalid review comment.
Closes #833
I also added a single source for all the projects, it is now used in 5 places.