Skip to content

fix(blog-list): support SSG markdown output#92

Merged
SoonIter merged 1 commit into
mainfrom
fix/blog-list-ssg-md
May 22, 2026
Merged

fix(blog-list): support SSG markdown output#92
SoonIter merged 1 commit into
mainfrom
fix/blog-list-ssg-md

Conversation

@SoonIter
Copy link
Copy Markdown
Member

@SoonIter SoonIter commented May 18, 2026

Summary

  • Render BlogList as plain Markdown during Rspress SSG-MD via import.meta.env.SSG_MD.
  • Add Rstest coverage using react-render-to-markdown.

Verification

  • pnpm test
  • pnpm exec tsc --noEmit -p tsconfig.json
  • pnpm build
  • pnpm lint

Copilot AI review requested due to automatic review settings May 18, 2026 08:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates BlogList to support Rspress SSG Markdown output by rendering a plain Markdown representation when import.meta.env.SSG_MD is enabled, adds test coverage for that behavior, and tweaks the Rspress layout patch to reduce empty footer spacing.

Changes:

  • Add an SSG-MD-specific markdown rendering path in BlogList gated by import.meta.env.SSG_MD.
  • Introduce rstest + react-render-to-markdown coverage to validate the markdown output.
  • Adjust TypeScript and project tooling configuration to support the new test/build setup.

Reviewed changes

Copilot reviewed 5 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tsconfig.json Switch TS module settings to ESNext + bundler resolution to align with ESM/bundler semantics.
src/env.d.ts Add ImportMetaEnv.SSG_MD typing for the SSG-MD flag.
src/blog-list/index.tsx Add markdown-only rendering helpers + SSG-MD branch; tweak Rspress layout CSS patch.
src/blog-list/index.test.tsx Add a markdown rendering test using react-render-to-markdown.
rstest.config.ts Configure rstest and define import.meta.env.SSG_MD for tests.
package.json Add test script and devDependencies for the new test tooling.
pnpm-lock.yaml Lockfile updates for newly added dependencies.
.prettierignore Ignore .claude/ from formatting.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/blog-list/index.tsx Outdated
@SoonIter SoonIter force-pushed the fix/blog-list-ssg-md branch 3 times, most recently from 6077266 to f3139d1 Compare May 18, 2026 08:33
@SoonIter
Copy link
Copy Markdown
Member Author

@copilot rebase to the latest origin/main

Copy link
Copy Markdown

Copilot AI commented May 21, 2026

@copilot rebase to the latest origin/main

Rebased locally onto the latest origin/main; the rebased head is 2af17f6. I couldn’t push the rewritten history from this environment because the available push path won’t force-push a non-fast-forward update. If you want, I can switch to a merge-based update that can be pushed from here.

@SoonIter SoonIter force-pushed the fix/blog-list-ssg-md branch from 3c50f95 to 6787b7c Compare May 22, 2026 07:01
@SoonIter SoonIter merged commit cdd1ae5 into main May 22, 2026
6 checks passed
@SoonIter SoonIter deleted the fix/blog-list-ssg-md branch May 22, 2026 07:25
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.

3 participants