Skip to content

[feat] add new blogs#387

Merged
apsinghdev merged 3 commits into
mainfrom
link/blogs-pitch
Jun 1, 2026
Merged

[feat] add new blogs#387
apsinghdev merged 3 commits into
mainfrom
link/blogs-pitch

Conversation

@apsinghdev

@apsinghdev apsinghdev commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

Release Notes

  • New Features

    • Blog layout now initializes and persists a selectable blog theme (dark, light, sepia, green)
    • Published several new blog posts (journey, scaling, stay-small, tools, how I started)
  • Improvements

    • External links in blog posts now open securely in new tabs
    • Blog theme initialization made more robust and responsive
  • Style

    • Standardized blog typography and refreshed link/heading styles

@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
opensox-website Ready Ready Preview, Comment Jun 1, 2026 7:39pm

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@apsinghdev, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3d585fd4-c25d-43c0-96a1-5852ac9999e4

📥 Commits

Reviewing files that changed from the base of the PR and between bf44ad2 and fa6374d.

📒 Files selected for processing (1)
  • apps/web/src/lib/blog.ts
📝 Walkthrough

Walkthrough

Adds 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.

Changes

Blog System Infrastructure

Layer / File(s) Summary
Blog layout and theme initialization
apps/web/src/app/(main)/blog/layout.tsx, apps/web/src/app/(main)/blog/blog-theme.tsx
New BlogLayout injects a beforeInteractive script that reads localStorage.blog-theme, validates against dark/light/sepia/green, falls back to dark, and sets document.documentElement[data-blog-theme]. BlogThemeSelector switches from useEffect to useLayoutEffect for synchronous theme application.
Blog styling and component typography
apps/web/src/app/globals.css, apps/web/src/app/(main)/blog/blog-list.tsx, apps/web/src/app/(main)/blog/[slug]/page.tsx
Adds .blog-heading, .blog-list-title, adjusts .prose-blog heading sizes and link underline/transition behavior, refactors theme variables (default/green overrides), and replaces inline Tailwind heading classes with standardized blog classes in blog list and slug components.
HTML sanitization and link security
apps/web/src/lib/blog.ts
sanitize-html now allows anchor attributes (href, name, target, rel). Sanitized HTML is post-processed to add target="_blank" and ensure rel="noopener noreferrer" for external links when not already present.

Blog Content and Marketing Updates

Layer / File(s) Summary
New blog posts
apps/web/src/content/blog/my-journey-of-open-source.mdx, apps/web/src/content/blog/how-i-started-opensox.mdx, apps/web/src/content/blog/stay-small.mdx, apps/web/src/content/blog/scale-is-the-problem.mdx, apps/web/src/content/blog/stuff-i-use.mdx
Adds five MDX posts: "my-journey-of-open-source" (three-year journey to OSS contributions), "how-i-started-opensox" (early product story), "stay-small" and "scale-is-the-problem" (community scale reflections), and "stuff-i-use" (tools & supplements with affiliate links and disclosure).
Pitch page copy rewrite
apps/web/src/app/(main)/(landing)/pitch/page.tsx
Rewrites opening paragraph to link to "my-journey-of-open-source"; rephrases problem sections (exposure, feedback, selling skills, problem solving); restructures "here's how" bullets; inserts a "stay-small" link; and updates membership split and learning-method paragraphs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hopped through styles and scripts today,
I nudged the theme so blogs behave,
Wrote posts that tell a journey’s start,
And polished words to warm the heart,
A tiny hop for content brave.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary change: adding new blog posts and related blog infrastructure updates to the codebase.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch link/blogs-pitch

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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (3)
apps/web/src/app/(main)/(landing)/pitch/page.tsx (2)

36-43: ⚡ Quick win

Consider 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 win

Add explicit return type annotation to component.

The Pitch component lacks an explicit return type annotation. As per coding guidelines for apps/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 win

prefer useEffect here.

the layout already sets data-blog-theme before hydration, so this layout effect no longer prevents flicker but still blocks paint on mount and updates. useEffect keeps 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

📥 Commits

Reviewing files that changed from the base of the PR and between 0a8b183 and 60ea3c3.

📒 Files selected for processing (12)
  • apps/web/src/app/(main)/(landing)/pitch/page.tsx
  • apps/web/src/app/(main)/blog/[slug]/page.tsx
  • apps/web/src/app/(main)/blog/blog-list.tsx
  • apps/web/src/app/(main)/blog/blog-theme.tsx
  • apps/web/src/app/(main)/blog/layout.tsx
  • apps/web/src/app/globals.css
  • apps/web/src/content/blog/how-i-started-opensox.mdx
  • apps/web/src/content/blog/my-journey-of-open-source.mdx
  • apps/web/src/content/blog/scale-is-the-problem.mdx
  • apps/web/src/content/blog/stay-small.mdx
  • apps/web/src/content/blog/stuff-i-use.mdx
  • apps/web/src/lib/blog.ts

Comment thread apps/web/src/app/globals.css
Comment thread apps/web/src/content/blog/how-i-started-opensox.mdx Outdated
Comment thread apps/web/src/content/blog/stuff-i-use.mdx Outdated
Comment thread apps/web/src/lib/blog.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 60ea3c3 and bf44ad2.

📒 Files selected for processing (4)
  • apps/web/src/app/globals.css
  • apps/web/src/content/blog/how-i-started-opensox.mdx
  • apps/web/src/content/blog/stuff-i-use.mdx
  • apps/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

Comment thread apps/web/src/content/blog/how-i-started-opensox.mdx
Comment thread apps/web/src/lib/blog.ts Outdated
@apsinghdev
apsinghdev merged commit d10c6e2 into main Jun 1, 2026
3 checks passed
This was referenced Jul 4, 2026
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.

1 participant