fix(blog-list): support SSG markdown output#92
Conversation
There was a problem hiding this comment.
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
BlogListgated byimport.meta.env.SSG_MD. - Introduce
rstest+react-render-to-markdowncoverage 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.
6077266 to
f3139d1
Compare
|
@copilot rebase to the latest origin/main |
Rebased locally onto the latest |
d6bada3 to
3c50f95
Compare
3c50f95 to
6787b7c
Compare
Summary
BlogListas plain Markdown during Rspress SSG-MD viaimport.meta.env.SSG_MD.react-render-to-markdown.Verification
pnpm testpnpm exec tsc --noEmit -p tsconfig.jsonpnpm buildpnpm lint