-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add sitemap for better support #48
Conversation
Astro will treat better with `site` option.
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.
Copilot reviewed 2 out of 3 changed files in this pull request and generated no suggestions.
Files not reviewed (1)
- package.json: Language not supported
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #48 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 172 172
Branches 17 17
=========================================
Hits 172 172 ☔ View full report in Codecov by Sentry. |
🔦 Lighthouse Result
📊 Score Scale
|
WalkthroughThe pull request introduces modifications to the Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (2)
package.json (1)
17-17
: LGTM! Consider using caret version rangeThe addition of @astrojs/sitemap is appropriate for implementing the sitemap feature. However, consider using the caret version range (^3.2.1) to automatically accept compatible updates while maintaining major version stability.
- "@astrojs/sitemap": "3.2.1", + "@astrojs/sitemap": "^3.2.1",astro.config.ts (1)
Line range hint
13-35
: Consider enhancing PWA configuration for better device supportThe current PWA configuration could be improved in several areas:
- Consider adding multiple icon sizes for better device compatibility
- The cache size limit (2.2MB) seems arbitrary and might need adjustment based on your actual asset sizes
Consider updating the configuration like this:
AstroPWA({ manifest: { name: meta.name, short_name: meta.name, description: meta.description, - icons: [{ src: meta.icon }], + icons: [ + { src: meta.icon, sizes: "192x192", type: "image/png" }, + { src: meta.icon, sizes: "512x512", type: "image/png" }, + { src: meta.icon, sizes: "512x512", type: "image/png", purpose: "maskable" } + ], orientation: "landscape", display: "fullscreen", theme_color: "#f4f4f4", }, workbox: { - maximumFileSizeToCacheInBytes: 1024 * 1024 * 2.2, + maximumFileSizeToCacheInBytes: 3 * 1024 * 1024, // 3MB rounded value globPatterns: ["**/*.{html,js,woff2}"], navigateFallback: "/", runtimeCaching: [ { handler: "NetworkFirst", options: { cacheName: "icon" }, urlPattern: () => true, }, ], }, }),
🛑 Comments failed to post (1)
astro.config.ts (1)
12-12: 🛠️ Refactor suggestion
Consider reordering integrations for optimal sitemap generation
The sitemap integration should typically run last in the integration chain to ensure it captures all routes, including those generated by other integrations.
Apply this diff to reorder the integrations:
const integrations: AstroIntegration[] = [ - sitemap(), AstroPWA({ // ... PWA config }), icon(), + sitemap(), ];Also applies to: 36-36
close #
✏️ Description
Astro will treat better with the
site
option.🔄 Type of the Change