Skip to content

Conversation

@ComputelessComputer
Copy link
Collaborator

@ComputelessComputer ComputelessComputer commented Dec 1, 2025

Update sitemap.ts to reflect current website structure

Summary

Updates the sitemap configuration to include new routes that have been added to the website and adds dynamic route handlers for content collections that were missing.

New static routes added:

  • /brand, /company-handbook, /file-transcription, /free, /gallery, /oss-friends, /press-kit, /download/apple-intel

New dynamic route handlers added:

  • /templates/$slug - generates URLs from allTemplates collection
  • /shortcuts/$slug - generates URLs from allShortcuts collection
  • /roadmap/$slug - generates URLs from allRoadmaps collection
  • /vs/$slug - generates URLs from allVs collection
  • /company-handbook/$ - generates URLs from allHandbooks collection
  • /gallery/$type/$slug - generates URLs for gallery items (templates + shortcuts)

Removed:

  • /contact route (moved to root level, outside _view layout)

Review & Testing Checklist for Human

  • Verify content collection file names: The dynamic handlers reference allRoadmaps.js, allVs.js, allHandbooks.js, allShortcuts.js - confirm these are the correct generated file names in .content-collections/generated/
  • Confirm /contact removal is intentional: The route exists at root level but was removed from sitemap - verify this is desired behavior
  • Test sitemap generation locally: Run the build and verify the generated sitemap.xml includes all expected URLs
  • Review priority values: Ensure the assigned priorities align with SEO strategy

Notes

- Add new static routes: /brand, /company-handbook, /file-transcription, /free, /gallery, /oss-friends, /press-kit, /download/apple-intel
- Add dynamic route handlers for: /templates/$slug, /shortcuts/$slug, /roadmap/$slug, /vs/$slug, /company-handbook/$, /gallery/$type/$slug
- Remove /contact route (moved to root level, not part of _view layout)

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Dec 1, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 7c59b4c
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/692d8f294b9847000865fe0a
😎 Deploy Preview https://deploy-preview-2053--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 1, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 7c59b4c
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/692d8f29da22fd0008d30671
😎 Deploy Preview https://deploy-preview-2053--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

📝 Walkthrough

Walkthrough

Extended sitemap generation to include numerous new static routes (/brand, /company-handbook, /file-transcription, /free, /gallery, /oss-friends, /press-kit) and dynamic route handlers for templates, shortcuts, roadmaps, comparisons, company handbooks, and gallery items. Added lastModified fields and error handling with fallback logic across all dynamic handlers.

Changes

Cohort / File(s) Summary
Sitemap Route Expansion
apps/web/src/utils/sitemap.ts
Replaced static /contact route with /brand; added six new static routes. Introduced five dynamic route handlers (/templates/$slug, /shortcuts/$slug, /roadmap/$slug, /vs/$slug, /company-handbook/$slug) with frequency and lastModified metadata. Added gallery aggregation combining template and shortcut items into /gallery/template/{slug} and /gallery/shortcut/{slug} entries. All dynamic handlers include error handling with warning logs and empty list fallbacks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Additional focus areas:
    • Verify error handling and logging consistency across all five dynamic route handlers
    • Validate gallery aggregation logic for correct template and shortcut mapping to gallery routes
    • Confirm lastModified field availability and fallback behavior across different content types
    • Check frequency assignments (weekly vs. monthly) for each route type match intended SEO strategy

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: updating the sitemap configuration to reflect the current website structure with new routes.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, detailing new static routes, dynamic handlers, removals, and testing guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1764593417-update-sitemap

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

Copy link
Contributor

@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 (2)
apps/web/src/utils/sitemap.ts (2)

286-305: Consider adding lastModified for SEO consistency.

The handlers for /templates/$slug, /shortcuts/$slug, /vs/$slug, and /gallery/$type/$slug omit the lastModified field, while other handlers (blog, changelog, roadmap, company-handbook) include it. If these content types have updated or created fields, adding lastModified improves search engine indexing.

Example for /templates/$slug:

          return allTemplates.map((template: any) => ({
            path: `/templates/${template.slug}`,
            priority: 0.7,
            changeFrequency: "weekly" as const,
+           lastModified: template.updated || template.created,
          }));

Also applies to: 307-326, 350-369, 393-428


286-428: Extract common module resolution logic into a helper.

Every dynamic handler repeats the same boilerplate for resolving .content-collections module paths. Consider extracting this to reduce duplication and simplify future additions.

async function loadContentCollection<T>(fileName: string): Promise<T[]> {
  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/${fileName}`,
  );
  const { default: items } = await import(modulePath);
  return items;
}

// Usage:
"/templates/$slug": async () => {
  try {
    const allTemplates = await loadContentCollection<any>("allTemplates.js");
    return allTemplates.map((template) => ({
      path: `/templates/${template.slug}`,
      priority: 0.7,
      changeFrequency: "weekly" as const,
    }));
  } catch (error) {
    console.warn("Failed to load templates for sitemap:", error);
    return [];
  }
},
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7dc068 and 7c59b4c.

📒 Files selected for processing (1)
  • apps/web/src/utils/sitemap.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.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/src/utils/sitemap.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, use cn (import from @hypr/utils). It is similar to clsx. Always pass an array and split by logical grouping.
Use motion/react instead of framer-motion.

Files:

  • apps/web/src/utils/sitemap.ts
⏰ 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). (6)
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: Devin
  • GitHub Check: fmt
  • GitHub Check: ci
🔇 Additional comments (3)
apps/web/src/utils/sitemap.ts (3)

129-160: LGTM!

The new static routes (/brand, /company-handbook, /file-transcription, /free, /gallery, /oss-friends, /press-kit) are configured with appropriate priorities and change frequencies that align with the existing patterns in the file.


182-189: LGTM!

Adding /download/apple-intel alongside /download/apple-silicon for complete coverage of download options.


393-428: LGTM on aggregating gallery items from templates and shortcuts.

The approach of combining both content types into a single handler for the /gallery/$type/$slug route is logical and correctly produces distinct paths for /gallery/template/{slug} and /gallery/shortcut/{slug}.

@ComputelessComputer ComputelessComputer merged commit 6460c09 into main Dec 1, 2025
14 of 15 checks passed
@ComputelessComputer ComputelessComputer deleted the devin/1764593417-update-sitemap branch December 1, 2025 13:11
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.

2 participants