Enable sitemap host and copy sitemap to build output#2093
Enable sitemap host and copy sitemap to build output#2093ComputelessComputer merged 1 commit intomainfrom
Conversation
📝 WalkthroughWalkthroughAdded sitemap handling to the web build: the build script now copies Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
Comment |
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for hyprnote-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
apps/web/vite.config.ts (1)
18-20: Confirm sitemap host is the intended canonical domain for all buildsAdding
sitemap.hostshould fix the type hint and produce correct absolute URLs; just confirmhttps://hyprnote.comis the canonical host you want for all environments (including Netlify previews). If you ever need environment-specific hosts, consider wiring this through an env var instead of hard-coding.apps/web/package.json (1)
7-7: Build script behavior and portabilityThe updated build pipeline correctly ensures
sitemap.xmlis indist/clientbeforepagefindruns, which should fix the 404. Note that using barecpmakes this script POSIX-only and will fail ifpublic/sitemap.xmlis ever missing; if Windows dev environments or softer failure modes matter, you could swap this for a small Node copy script or a cross‑platform CLI.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
apps/web/package.json(1 hunks)apps/web/vite.config.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.ts: Agent implementations should use TypeScript and follow the established architectural patterns defined in the agent framework
Agent communication should use defined message protocols and interfaces
Files:
apps/web/vite.config.ts
**/*.config.{ts,json}
📄 CodeRabbit inference engine (CLAUDE.md)
Agent configuration should be centralized and externalized from implementation logic
Files:
apps/web/vite.config.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props, just inline them instead.
Never do manual state management for form/mutation. Use useForm (from tanstack-form) and useQuery/useMutation (from tanstack-query) instead for 99% of cases. Avoid patterns like setError.
If there are many classNames with conditional logic, usecn(import from@hypr/utils). It is similar toclsx. Always pass an array and split by logical grouping.
Usemotion/reactinstead offramer-motion.
Files:
apps/web/vite.config.ts
🧠 Learnings (1)
📚 Learning: 2025-11-24T16:32:24.348Z
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: apps/desktop-e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:24.348Z
Learning: Applies to apps/desktop-e2e/**/*.{test,spec}.{js,ts,tsx} : Refer to `scripts/setup-desktop-e2e.sh` for end-to-end test environment setup if setup is missing
Applied to files:
apps/web/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Redirect rules - hyprnote-storybook
- GitHub Check: Header rules - hyprnote-storybook
- GitHub Check: Pages changed - hyprnote-storybook
- GitHub Check: Redirect rules - hyprnote
- GitHub Check: Header rules - hyprnote
- GitHub Check: Pages changed - hyprnote
- GitHub Check: fmt
- GitHub Check: ci
Set the sitemap host for TanStack's prerender to "https://hyprnote.com" so sitemap generation is enabled and avoids the typecheck hint about missing sitemap.host. Also copy the prebuilt public/sitemap.xml into the Vite build output (dist/client) before running pagefind so the sitemap is present at /sitemap.xml and not 404. This resolves the collision between TanStack's sitemap handling and the existing apps/web sitemap file; it preserves using apps/web/content-collections.ts for content sources.
5d05cb6 to
77b4a61
Compare
Set the sitemap host for TanStack's prerender to "https://hyprnote.com" so sitemap generation is enabled and avoids the typecheck hint about missing sitemap.host. Also copy the prebuilt public/sitemap.xml into the Vite build output (dist/client) before running pagefind so the sitemap is present at /sitemap.xml and not 404. This resolves the collision between TanStack's sitemap handling and the existing apps/web sitemap file; it preserves using apps/web/content-collections.ts for content sources.