Fix Docusaurus blog posts missing truncation markers #299
+66
−0
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.
Resolves Docusaurus build warnings about blog posts without truncation markers by adding
{/* truncate */}
markers to all 36 affected blog posts.Problem
Docusaurus was generating warnings during build:
This affected blog post previews on paginated blog lists, where the entire content was being displayed instead of a truncated preview.
Solution
Added
{/* truncate */}
markers to all 36 blog posts that were missing them. The markers were strategically placed after the introductory content (typically 1-2 paragraphs) to provide meaningful previews while keeping them concise.Technical Details
Since the Docusaurus configuration sets
format: 'mdx'
, all markdown files (both.md
and.mdx
) are processed as MDX format, requiring JSX comment syntax{/* truncate */}
instead of HTML comment syntax<!-- truncate -->
.Testing
This change improves the user experience on blog paginated lists by showing concise previews instead of full article content.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.