Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 27, 2026

This PR creates a comprehensive sitemap.ts file that includes all static pages and dynamically generated blog post URLs.

Changes

New File: src/app/sitemap.ts

Creates a Next.js sitemap using the MetadataRoute.Sitemap API that:

Static Pages (with priorities):

  • Homepage (priority: 1.0, daily)
  • /pricing (priority: 0.9, weekly)
  • /extension, /cloud (priority: 0.8, weekly)
  • /slack, /provider, /enterprise (priority: 0.7, weekly/monthly)
  • /evals, /reviewer, /pr-fixer (priority: 0.6, weekly)
  • /blog (priority: 0.8, daily) - NEW
  • Legal pages (priority: 0.2-0.3, monthly)

Dynamic Blog Post Pages:

  • All published blog posts from getAllBlogPosts()
  • URL format: /blog/[slug]
  • lastModified: publish_date from frontmatter
  • changeFrequency: monthly
  • priority: 0.7

How It Works

The sitemap is automatically generated at /sitemap.xml by Next.js. It uses the getAllBlogPosts function to dynamically include all published blog posts, which means new posts will be automatically included in the sitemap when published.

Reference

The sitemap is already referenced in robots.ts:

sitemap: `${SEO.url}/sitemap.xml`

Testing

  • Lint passes (pnpm lint)
  • Type check passes (pnpm check-types)

Closes MKT-71


Important

Adds comprehensive sitemap generation and blog content management with dynamic blog post URLs, analytics, and SEO enhancements.

  • Sitemap Generation:
    • New sitemap.ts in src/app generates sitemap with static pages and dynamic blog post URLs.
    • Static pages include homepage, pricing, and legal pages with specific priorities and change frequencies.
    • Dynamic blog posts are fetched using getAllBlogPosts() with monthly change frequency.
  • Blog Content Management:
    • Adds content.ts for loading and parsing markdown blog posts.
    • Introduces getAllBlogPosts() and getBlogPostBySlug() for fetching blog data.
    • Validates blog frontmatter using zod schema in types.ts.
  • Blog Post Pages:
    • New page.tsx for individual blog posts and page.tsx for blog index in src/app/blog.
    • Uses ReactMarkdown with remarkGfm for rendering markdown content.
    • Includes SEO metadata and JSON-LD structured data for blog posts.
  • Analytics and SEO:
    • blog-analytics.tsx tracks page views, scroll depth, and time spent using PostHog.
    • structured-data.ts generates JSON-LD for articles and collections.
  • Navigation Updates:
    • Adds blog links to footer.tsx and nav-bar.tsx components.
    • Updates package.json to include gray-matter for markdown parsing.

This description was created by Ellipsis for 63d8d63. You can customize this summary. It will automatically update as commits are pushed.

- Add gray-matter for frontmatter parsing
- Create BlogPost type and zod schema for validation
- Implement PT timezone helpers (getNowPt, parsePublishTimePt)
- Implement content loading (getAllBlogPosts, getBlogPostBySlug)
- Implement isPublished for request-time publish gating
- Add validation for frontmatter and duplicate slugs
- Create content/blog directory for markdown files

Closes: MKT-67
…he Past

Adds the first canonical blog post to validate the content pipeline:
- Title: PRDs Are Becoming Artifacts of the Past
- Slug: prds-are-becoming-artifacts-of-the-past
- Status: published
- Publish date: 2026-01-12 at 9:00am PT

Content sourced from Office Hours S01E15 with Paige Bailey.

Closes: MKT-73
- Create blog index page at /blog
- Use force-dynamic for request-time publish gating
- Require Node.js runtime for filesystem reads
- Display posts with title, description, and date
- Add empty state when no posts are published
- Include tags display (up to 3)

Closes: MKT-68
- Create dynamic route for individual blog posts
- Use force-dynamic for request-time publish gating
- Require Node.js runtime for filesystem reads
- Return 404 for drafts, future posts, or invalid slugs
- Render Markdown with react-markdown + remark-gfm
- No raw HTML rendering (safe by default)
- Include consistent typography and styling

Closes: MKT-69
- Add structured-data.ts with Article, CollectionPage, and BreadcrumbList schemas
- Integrate JSON-LD into /blog index page (Blog collection + breadcrumbs)
- Integrate JSON-LD into /blog/[slug] page (Article + post breadcrumbs)
- Export structured data utilities from blog module index

MKT-70
- Add analytics.ts with blog-specific tracking events:
  - trackBlogIndexView: Track blog index views with post count
  - trackBlogPostView: Track individual post views with metadata
  - trackBlogPostScrollDepth: Track reading progress (25%, 50%, 75%, 100%)
  - trackBlogPostTimeSpent: Track time spent on posts
  - trackBlogPostShare: Track social share clicks
  - trackBlogPostCTAClick: Track CTA engagement

- Add BlogIndexAnalytics and BlogPostAnalytics client components
- Integrate analytics into /blog and /blog/[slug] pages

Attribution is handled by PostHog save_referrer and save_campaign_params.

MKT-74
- Add SUBSTACK link to constants.ts
- Add Blog link to desktop nav Resources dropdown
- Add Blog link to mobile nav Resources section
- Add Blog link to footer Resources section
- Add Substack link to footer Connect section

MKT-72
- Create sitemap.ts with MetadataRoute.Sitemap for Next.js
- Include all static pages with priorities and change frequencies
- Include /blog index page (priority 0.8, daily updates)
- Dynamically include all published blog post URLs (/blog/[slug])
- Blog posts use publish_date as lastModified

The sitemap is referenced by robots.ts at /sitemap.xml

MKT-71
@roomote roomote bot requested review from cte, jr and mrubens as code owners January 27, 2026 19:58
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. Enhancement New feature or request labels Jan 27, 2026
@roomote
Copy link
Contributor Author

roomote bot commented Jan 27, 2026

Rooviewer Clock   See task on Roo Cloud

All issues have been resolved. The latest commit fixes build issues by avoiding barrel imports in client components.

  • Consider adding dynamic and runtime exports to sitemap.ts to match blog page behavior for scheduled posts
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@roomote roomote bot changed the title feat(blog): add sitemap.ts with blog and blog post URLs MKT-71: Update sitemap generation to include blog and blog posts Jan 27, 2026
@mp-roocode mp-roocode self-assigned this Jan 27, 2026
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
@mp-roocode
Copy link
Collaborator

@roomote
Copy link
Contributor Author

roomote bot commented Jan 28, 2026

Fixaroo Clock   See task on Roo Cloud

Fixed the build failure. The client component was importing from the barrel export which pulled in Node.js fs module. Changed to direct imports.

View commit | Revert commit

The blog-analytics.tsx client component was importing from the @/lib/blog
barrel export, which transitively included content.ts that uses the Node.js
fs module. This caused the build to fail with "Module not found: Cannot
resolve fs" error.

Changed imports to use direct file paths:
- Import BlogPost type from @/lib/blog/types
- Import analytics functions from @/lib/blog/analytics

This avoids pulling content.ts into the client bundle.
@github-actions
Copy link
Contributor

🚀 Preview deployed!

Your changes have been deployed to Vercel:

Preview URL: https://roo-code-website-k8ql2dloc-roo-code.vercel.app

This preview will be updated automatically when you push new commits to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants