[feat] add new blogs#387
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 12 minutes and 32 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. 📝 WalkthroughWalkthroughAdds a BlogLayout with client-side theme initialization, standardizes blog typography and theme CSS, extends post sanitization to enforce secure external link attributes, publishes multiple MDX blog posts, and rewrites the landing pitch page copy to reference the new posts and update marketing text. ChangesBlog System Infrastructure
Blog Content and Marketing Updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 4
🧹 Nitpick comments (3)
apps/web/src/app/(main)/(landing)/pitch/page.tsx (2)
36-43: ⚡ Quick winConsider removing
target="_blank"for internal blog links.The internal blog links at lines 36-43 and 239-246 open in new tabs. Standard web UX convention is that internal links navigate within the same tab, while external links open new tabs. Opening internal content in new tabs can confuse users and clutter their browser.
Proposed fix
<Link href="/blog/my-journey-of-open-source" - target="_blank" - rel="noopener noreferrer" className="text-link hover:text-link-hover underline" > my journey of open source </Link><Link href="/blog/stay-small" - target="_blank" - rel="noopener noreferrer" className="text-link hover:text-link-hover underline" > stay small </Link>If the new-tab behavior is intentional (e.g., to keep users on the pitch page), consider adding a visual indicator like an icon or screen-reader text to signal this behavior to users.
Also applies to: 239-246
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/app/`(main)/(landing)/pitch/page.tsx around lines 36 - 43, The Link component pointing to "/blog/my-journey-of-open-source" (and the similar internal Link later) should not open a new tab: remove target="_blank" and the noopener noreferrer rel attributes from those internal <Link> instances so they navigate in the same tab; if the new-tab behavior was intentional, instead keep the attributes and add a clear visual indicator or screen-reader text to those Link elements so users know they will open a new tab.
12-12: ⚡ Quick winAdd explicit return type annotation to component.
The
Pitchcomponent lacks an explicit return type annotation. As per coding guidelines forapps/web/src/**/*.{tsx,ts}, const functions should define their type.Proposed fix
-const Pitch = () => { +const Pitch: React.FC = () => {Or more precisely:
-const Pitch = () => { +const Pitch = (): React.ReactElement => {As per coding guidelines: Define a type when defining const functions.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/app/`(main)/(landing)/pitch/page.tsx at line 12, The Pitch component is missing an explicit return type annotation; update its declaration (the const Pitch = () => { ... } function) to include a proper TypeScript return type such as ": React.JSX.Element" or ": JSX.Element" (or use "React.FC" if you prefer a functional component type), and ensure any props are typed accordingly so the signature is fully annotated.apps/web/src/app/(main)/blog/blog-theme.tsx (1)
25-31: ⚡ Quick winprefer
useEffecthere.the layout already sets
data-blog-themebefore hydration, so this layout effect no longer prevents flicker but still blocks paint on mount and updates.useEffectkeeps the persistence logic without the synchronous layout work.proposed change
-import { useState, useLayoutEffect } from "react"; +import { useEffect, useState } from "react"; @@ - useLayoutEffect(() => { + useEffect(() => { document.documentElement.setAttribute("data-blog-theme", theme); localStorage.setItem("blog-theme", theme); return () => { document.documentElement.removeAttribute("data-blog-theme"); }; }, [theme]);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/app/`(main)/blog/blog-theme.tsx around lines 25 - 31, Replace useLayoutEffect with useEffect in the blog theme hook so the DOM attribute and localStorage writes run asynchronously after paint: change the call site using useLayoutEffect to useEffect in blog-theme.tsx (the effect that sets document.documentElement.setAttribute("data-blog-theme", theme), localStorage.setItem("blog-theme", theme) and the cleanup that calls document.documentElement.removeAttribute("data-blog-theme")), keeping the same dependency array ([theme]) and cleanup logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/src/app/globals.css`:
- Around line 75-85: Stylelint is flagging declaration-empty-line-before
violations in the .blog-heading and .blog-list-title rules; fix by adding the
required empty line(s) before the first declaration in each rule block so they
conform to the project's declaration-empty-line-before setting (i.e., ensure
there's a blank line between the selector line and the first `@apply/font-family`
declarations in .blog-heading and .blog-list-title, and mirror the same spacing
pattern for the similar block at lines ~171-183).
In `@apps/web/src/content/blog/how-i-started-opensox.mdx`:
- Line 3: Frontmatter date and the narrative disagree: the frontmatter key
"date" is set to "2026-06-01" while the post text contains the phrase "10th
august 2026"; reconcile them by choosing the correct year (per other references
it should be 2025) — update the frontmatter "date" to the ISO form for the
intended publish/event date (e.g., "2025-08-10") and change the narrative phrase
"10th august 2026" to "10th august 2025" so both the date field and the in-text
date match.
In `@apps/web/src/content/blog/stuff-i-use.mdx`:
- Line 5: The frontmatter author value in stuff-i-use.mdx is lowercased as
author: "ajeet" while other posts use "Ajeet"; update the frontmatter author
field in this file (author: "ajeet") to use the same capitalization (author:
"Ajeet") to match the rest of the blog posts and keep naming consistent.
In `@apps/web/src/lib/blog.ts`:
- Around line 69-72: The current replacement on safeHtml (assigned to html)
blindly rewrites any <a href="..."> and fails for relative/fragment links and
anchors with other attributes; update the safeHtml.replace call so the regex
matches the entire opening <a ...> tag (not just the bare href form) and only
targets external URLs (e.g., href values starting with http:, https:, or
protocol-relative //), then inject target="_blank" rel="noopener noreferrer"
into that opening tag while preserving any existing attributes; locate the
safeHtml.replace usage and change the pattern and replacement logic accordingly
so relative links (/, #) are skipped and existing attributes are retained.
---
Nitpick comments:
In `@apps/web/src/app/`(main)/(landing)/pitch/page.tsx:
- Around line 36-43: The Link component pointing to
"/blog/my-journey-of-open-source" (and the similar internal Link later) should
not open a new tab: remove target="_blank" and the noopener noreferrer rel
attributes from those internal <Link> instances so they navigate in the same
tab; if the new-tab behavior was intentional, instead keep the attributes and
add a clear visual indicator or screen-reader text to those Link elements so
users know they will open a new tab.
- Line 12: The Pitch component is missing an explicit return type annotation;
update its declaration (the const Pitch = () => { ... } function) to include a
proper TypeScript return type such as ": React.JSX.Element" or ": JSX.Element"
(or use "React.FC" if you prefer a functional component type), and ensure any
props are typed accordingly so the signature is fully annotated.
In `@apps/web/src/app/`(main)/blog/blog-theme.tsx:
- Around line 25-31: Replace useLayoutEffect with useEffect in the blog theme
hook so the DOM attribute and localStorage writes run asynchronously after
paint: change the call site using useLayoutEffect to useEffect in blog-theme.tsx
(the effect that sets document.documentElement.setAttribute("data-blog-theme",
theme), localStorage.setItem("blog-theme", theme) and the cleanup that calls
document.documentElement.removeAttribute("data-blog-theme")), keeping the same
dependency array ([theme]) and cleanup logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 06f18b2d-10ad-494b-a160-a4cc29861979
📒 Files selected for processing (12)
apps/web/src/app/(main)/(landing)/pitch/page.tsxapps/web/src/app/(main)/blog/[slug]/page.tsxapps/web/src/app/(main)/blog/blog-list.tsxapps/web/src/app/(main)/blog/blog-theme.tsxapps/web/src/app/(main)/blog/layout.tsxapps/web/src/app/globals.cssapps/web/src/content/blog/how-i-started-opensox.mdxapps/web/src/content/blog/my-journey-of-open-source.mdxapps/web/src/content/blog/scale-is-the-problem.mdxapps/web/src/content/blog/stay-small.mdxapps/web/src/content/blog/stuff-i-use.mdxapps/web/src/lib/blog.ts
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/src/content/blog/how-i-started-opensox.mdx`:
- Line 13: The sentence "but one day, at noon on 10th august 2025, i got a
twitter DM from a guy named daksh..." uses a lowercase brand name and pronoun
casing; update that sentence in the MDX content so "twitter" becomes "Twitter"
and capitalize "i" to "I" to match style and polish in the post (locate the
exact sentence in the blog content and replace the words accordingly).
In `@apps/web/src/lib/blog.ts`:
- Around line 16-25: The early return when target exists skips rel
normalization: update the logic around isExternal/attrs/full so you do not
return early for links that already have a target; always compute and normalize
the attrs into a variable (e.g., use next as shown) and then ensure rel contains
both "noopener" and "noreferrer" (if rel missing, append rel="noopener
noreferrer"; if rel exists, add any missing tokens rather than only checking for
"noopener") by replacing the rel attribute value accordingly; reference the
existing symbols isExternal, attrs, full, next to locate and change the branch
so target presence does not bypass rel hardening.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1fc84621-8ac2-4d9a-89fc-7341a0468599
📒 Files selected for processing (4)
apps/web/src/app/globals.cssapps/web/src/content/blog/how-i-started-opensox.mdxapps/web/src/content/blog/stuff-i-use.mdxapps/web/src/lib/blog.ts
✅ Files skipped from review due to trivial changes (1)
- apps/web/src/content/blog/stuff-i-use.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/web/src/app/globals.css
Summary by CodeRabbit
Release Notes
New Features
Improvements
Style