Skip to content

Reorder blog post footer to render Share/Author before Giscus comments#1649

Merged
sanjay-kv merged 2 commits into
mainfrom
copilot/restructure-share-post-author-card
May 22, 2026
Merged

Reorder blog post footer to render Share/Author before Giscus comments#1649
sanjay-kv merged 2 commits into
mainfrom
copilot/restructure-share-post-author-card

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 22, 2026

Description

On blog post pages, the comment box was rendering before the social share section and author card. This updates the render order so Share this post and the author card appear first, with Giscus comments rendered after them.

Type of Change

  • New feature (e.g., new page, component, or functionality)
  • Bug fix (non-breaking change that fixes an issue)
  • UI/UX improvement (design, layout, or styling updates)
  • Performance optimization (e.g., code splitting, caching)
  • Documentation update (README, contribution guidelines, etc.)
  • Other (please specify):

Changes Made

  • Blog-only Giscus gating
    • Added route-aware behavior in src/components/giscus.tsx to suppress default inline MDX rendering on /blog/* unless explicitly forced.
  • Footer-controlled comment placement
    • Updated src/theme/BlogPostItem/Footer/index.tsx to render <GiscusComments forceRender /> at the end of the blog footer wrapper, after social share and author card.
  • Duplicate embed prevention
    • This avoids double comment mounts on blog pages by ensuring only the footer-owned instance renders there.
// src/components/giscus.tsx
if (isBlogPostPage && !forceRender) {
  return null;
}

// src/theme/BlogPostItem/Footer/index.tsx
{isBlogPostPage && <GiscusComments forceRender />}

Dependencies

  • No new dependencies.
  • No dependency version changes.

Checklist

  • My code follows the style guidelines of this project.
  • I have tested my changes across major browsers and devices
  • My changes do not generate new console warnings or errors .
  • I ran npm run build and attached screenshot(s) in this PR.
  • This is already assigned Issue to me, not an unassigned issue.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 22, 2026

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

Project Deployment Actions Updated (UTC)
recode-website Ready Ready Preview, Comment May 22, 2026 3:25pm

Copilot AI changed the title [WIP] Restructure share this post and author card order Reorder blog post footer to render Share/Author before Giscus comments May 22, 2026
Copilot AI requested a review from sanjay-kv May 22, 2026 15:26
@sanjay-kv sanjay-kv marked this pull request as ready for review May 22, 2026 15:45
@sanjay-kv sanjay-kv merged commit 570d0e0 into main May 22, 2026
7 checks passed
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.

Restructure the share this post and author card before the GiscusComments

2 participants