Conversation
…figured
When config.title is undefined, the template literal `# ${title}` produces
"# undefined" in the generated llms.txt. Now both plugin-llms and core
llms:true skip the title heading when title is undefined.
Add a logger.warn message in both plugin-llms and core llms:true paths to remind users to set `title` in rspress.config.ts when it is missing.
Deploying rspress-v2 with
|
| Latest commit: |
6496007
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://679d3c65.rspress-v2.pages.dev |
| Branch Preview URL: | https://syt-vibe-kanban-23ae-plugin.rspress-v2.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents generating llms.txt headings like # undefined when title is missing, and emits a warning to guide users toward setting title in rspress.config.ts.
Changes:
- Add a warning when
titleis falsy duringllms.txtgeneration. - Make the heading (
summary) optional and avoid outputting# undefined. - Adjust final output formatting to avoid a leading blank line when there is no heading.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/plugin-llms/src/llmsTxt.ts | Warn on missing title; omit heading and adjust formatting when title is absent. |
| packages/core/src/node/ssg-md/llms/llmsTxt.ts | Same missing-title handling and formatting adjustments in core SSG generator. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Rsdoctor Bundle Diff AnalysisFound 3 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
- Only warn about missing title when onTitleGenerate is not provided, since custom hooks may intentionally handle undefined titles. - Avoid trailing newline when summary exists but lines array is empty.
Timeless0911
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
# undefined > undefinedRelated Issue
Checklist
AI Summary
When
titleis not configured inrspress.config.ts, both@rspress/plugin-llmsand the corellms: truefeature generate# undefinedas the heading inllms.txt. This is because the template literal`# ${title}`directly interpolatesundefined.Changes
packages/plugin-llms/src/llmsTxt.ts: Whentitleisundefined, skip the heading instead of rendering# undefined, and emit alogger.warnto remind users to configuretitle.packages/core/src/node/ssg-md/llms/llmsTxt.ts: Same fix for the corellms: truecode path.summaryis empty (no title), the finalllmsTxtoutput starts directly from the section content with leading whitespace trimmed.Why
Generating
# undefinedinllms.txtis confusing and unhelpful. Instead of silently dropping the title, we warn users so they can fix their config, while still producing valid output.This PR was written using Vibe Kanban