-
Notifications
You must be signed in to change notification settings - Fork 432
seo related stuff #1706
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
seo related stuff #1706
Conversation
ComputelessComputer
commented
Nov 18, 2025
- dynamic sitemap generation
- updated meta tag data
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds sitemap generation support and SEO metadata: introduces a sitemap utility and integrates it into Vite, updates root route head metadata, adds robots.txt and llms.txt public files, and ignores generated sitemap.xml in git; includes package devDependency changes. Changes
Sequence Diagram(s)sequenceDiagram
participant Build as Build Process
participant Vite as Vite Config
participant Plugin as Sitemap Plugin
participant Sitemap as getSitemap()
participant Dynamic as Content Loaders
participant Output as public/sitemap.xml
Build->>Vite: run build
Vite->>Plugin: invoke sitemap plugin
Plugin->>Sitemap: call getSitemap()
Sitemap->>Sitemap: assemble static routes
Sitemap->>Dynamic: async import blog/changelog/legal/docs
Dynamic-->>Sitemap: return route items or error (fallback to [])
Sitemap-->>Plugin: return combined sitemap config
Plugin->>Output: write public/sitemap.xml
Output-->>Build: sitemap generation complete
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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: 2
🧹 Nitpick comments (1)
apps/web/src/utils/sitemap.ts (1)
168-189: Improve type safety for dynamic blog routes.The dynamic import pattern is functional but uses
anytype for articles, reducing type safety.Consider defining an interface for the article structure:
+interface Article { + slug: string; + created: string; + updated?: string; +} + "/blog/$slug": async () => { try { const path = await import("path"); const url = await import("url"); const __dirname = path.dirname(url.fileURLToPath(import.meta.url)); const modulePath = path.resolve( __dirname, "../../.content-collections/generated/allArticles.js", ); - const { default: allArticles } = await import(modulePath); + const { default: allArticles }: { default: Article[] } = await import(modulePath); - return allArticles.map((article: any) => ({ + return allArticles.map((article) => ({ path: `/blog/${article.slug}`, priority: 0.7, changeFrequency: "weekly" as const, lastModified: article.updated || article.created, })); } catch (error) { console.warn("Failed to load blog articles for sitemap:", error); return []; } },Apply the same pattern to
/changelog/$slug,/legal/$slug, and/docs/$routes.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
apps/web/.gitignore(1 hunks)apps/web/package.json(1 hunks)apps/web/public/llms.txt(1 hunks)apps/web/public/robots.txt(1 hunks)apps/web/src/routes/__root.tsx(2 hunks)apps/web/src/utils/sitemap.ts(1 hunks)apps/web/vite.config.ts(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/web/vite.config.ts (1)
apps/web/src/utils/sitemap.ts (1)
getSitemap(7-258)
🪛 LanguageTool
apps/web/public/llms.txt
[grammar] ~13-~13: Ensure spelling is correct
Context: ..., and compliance details. ## About Us Hyprnote is an AI-native notepad that supports r...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~14-~14: Ensure spelling is correct
Context: ..., ownership, and high-agency workflows. Hyprnote offers on-device STT for all users, wit...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~59-~59: Ensure spelling is correct
Context: ...e-first capabilities. - When describing Hyprnote, avoid positioning it as a bot or autom...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
⏰ 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). (1)
- GitHub Check: fmt
🔇 Additional comments (11)
apps/web/package.json (2)
69-69: LGTM! Sitemap dependency added.The addition of
tanstack-router-sitemapappropriately supports the new sitemap generation feature introduced in this PR.
67-68: Verify the package version downgrades with the PR author.Both jsdom 27.2.0 and netlify 23.11.0 are legitimate releases that exist on npm, but the downgrades are unusual given that:
- netlify v23.11.0 was released very recently (Nov 13, 2025), and downgrading immediately after a brand-new release warrants explanation.
- Web searches found no documented critical bugs or breaking changes in jsdom 27.2.0 or netlify 23.11.0 that would mandate these downgrades.
- jsdom 27.2.0 introduced CSSOM improvements and bug fixes, but ongoing performance and CSSOM issues exist in the broader v27 line.
Confirm with the author whether the downgrades are intentional (due to testing, discovered project-specific incompatibilities, or intentional stability preference) or accidental. Include reasoning in the commit message or PR description.
apps/web/public/robots.txt (1)
1-33: Well-structured robots.txt configuration.The file correctly:
- Allows crawling of public content
- Blocks protected routes (
/app/,/auth,/api/)- Provides explicit Allow directives for SEO-important sections
- References the AI-specific content file
apps/web/src/routes/__root.tsx (2)
17-21: LGTM! Well-structured SEO constants.Extracting the title, description, and keywords into constants promotes maintainability and reusability across the meta tags.
28-59: Comprehensive SEO metadata implementation.The expanded meta tags provide excellent SEO and social sharing support with:
- Standard meta tags (description, keywords)
- AI crawler directives (ai-sitemap, ai-content)
- Open Graph tags for rich social previews
- Twitter Card metadata
Note: Please verify the domain consistency issue flagged in
apps/web/public/robots.txt(Line 35) — this file useshyprnote.comwhilesitemap.tsuseshypr.com.apps/web/public/llms.txt (1)
1-81: LGTM! Comprehensive AI crawler documentation.This file provides excellent structured information for AI platforms to understand and accurately represent Hyprnote. The content is well-organized with clear sections covering features, use cases, and target audience.
Note: The static analysis grammar warnings about "Hyprnote" spelling are false positives — this is the product name.
apps/web/.gitignore (1)
13-13: LGTM! Correctly ignoring generated sitemap.Adding
public/sitemap.xmlto.gitignoreis the correct approach since the sitemap is generated during the build process.apps/web/vite.config.ts (1)
6-6: LGTM! Clean sitemap integration.The sitemap generation is properly integrated into the Vite build pipeline using the
tanstack-router-sitemapplugin and the localgetSitemap()configuration.Also applies to: 10-10, 36-36
apps/web/src/utils/sitemap.ts (3)
1-5: LGTM! Type-safe route configuration.The type alias
TRoutescorrectly constrains the sitemap to the application's actual routes viaFileRouteTypes["fullPaths"].
13-167: Comprehensive static route configuration.The static routes are well-organized with appropriate priorities and change frequencies:
- Homepage: priority 1.0, daily updates
- Core pages (pricing, docs, enterprise): 0.8-0.9 priority
- Product/solution pages: 0.7-0.8 priority
- Utility pages: 0.5-0.7 priority
168-255: Robust error handling for dynamic routes.The try/catch blocks with fallback to empty arrays ensure that sitemap generation won't fail if content files are missing or have errors. This is good defensive programming for a build-time process.
| # AI crawlers can find detailed content at /llms.txt | ||
|
|
||
| # Sitemap location | ||
| Sitemap: https://hypr.com/sitemap.xml |
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.
Critical: Domain inconsistency across SEO files.
The sitemap URL uses https://hypr.com/sitemap.xml, but other files in this PR use https://hyprnote.com:
apps/web/src/routes/__root.tsx(Lines 35, 40, 53) useshyprnote.comapps/web/src/utils/sitemap.ts(Line 9) useshypr.com
Please verify which domain is correct and ensure consistency across:
- robots.txt sitemap URL (this file)
- sitemap.ts siteUrl configuration
- __root.tsx meta tags (og:url, twitter:url, ai-sitemap)
#!/bin/bash
# Description: Check all domain references in the codebase for consistency
echo "Searching for hypr.com references..."
rg -n "hypr\.com" -g '!node_modules' -g '!dist' -C 2
echo -e "\nSearching for hyprnote.com references..."
rg -n "hyprnote\.com" -g '!node_modules' -g '!dist' -C 2🤖 Prompt for AI Agents
In apps/web/public/robots.txt around line 35 the sitemap URL points to
https://hypr.com/sitemap.xml which is inconsistent with other files
(apps/web/src/routes/__root.tsx lines ~35/40/53 using hyprnote.com and
apps/web/src/utils/sitemap.ts line 9 using hypr.com); decide the correct
canonical domain (hypr.com vs hyprnote.com) and update the robots.txt sitemap
URL to match it, then update apps/web/src/utils/sitemap.ts siteUrl and the meta
tags in apps/web/src/routes/__root.tsx (og:url, twitter:url, ai-sitemap) so all
three files reference the same domain, and run a repo-wide search to confirm no
remaining mismatched references.
|
|
||
| export function getSitemap(): Sitemap<TRoutes> { | ||
| return { | ||
| siteUrl: "https://hypr.com", |
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.
Critical: Domain inconsistency — must use hyprnote.com.
The siteUrl is set to https://hypr.com, which conflicts with https://hyprnote.com used in:
apps/web/src/routes/__root.tsx(Lines 35, 40, 53)
Please verify the correct domain and ensure consistency across all SEO files. This impacts search engine indexing and social sharing.
Apply this diff if hyprnote.com is the correct domain:
- siteUrl: "https://hypr.com",
+ siteUrl: "https://hyprnote.com",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| siteUrl: "https://hypr.com", | |
| siteUrl: "https://hyprnote.com", |