Add copy entire page as markdown feature to documentation#100
Closed
Add copy entire page as markdown feature to documentation#100
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for copying code as markdown in documentation view
Verify code copy functionality in documentation
Jan 24, 2026
Contributor
|
@copilot 我的意思是我想把整篇文章复制出来,而不是把其中某一个code,我知道原来那个就有 |
Contributor
Author
明白了!您想要复制整篇文章内容为 Markdown 格式,而不只是代码块。我现在会添加一个"复制整页为 Markdown"的功能。 |
Copilot stopped work on behalf of
hotlong due to an error
January 24, 2026 10:44
Contributor
|
@copilot 继续 |
Contributor
Author
好的,我继续完成"复制整页为 Markdown"的功能实现。 |
Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
Copilot
AI
changed the title
Verify code copy functionality in documentation
Add copy entire page as markdown feature to documentation
Jan 24, 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.
Implements functionality to copy entire documentation pages as raw Markdown content, addressing user request to copy complete articles rather than just individual code blocks.
Changes Made
New Component
apps/docs/components/copy-page-markdown.tsx: Client-side component that handles copying page content to clipboardUpdated Component
apps/docs/app/[lang]/docs/[[...slug]]/page.tsx: Server-side page componentFeature Description
Users can now copy the entire raw Markdown content of any documentation page by clicking the "Copy as Markdown" button located in the top-right corner of each page, adjacent to the page title. This allows users to easily export documentation content for offline use, editing, or sharing.
Button Placement
Technical Approach
fsmoduleKnown Pre-existing Issue
lucide-reactmodule resolution error that prevents pages from loading in development mode. This issue is not caused by this PR - it is a pre-existing configuration problem where MDX files directly importlucide-reactbut the server-side rendering context cannot properly resolve the module during compilation.Error:
Module not found: Can't resolve 'lucide-react'appears in multiple files including:content/docs/concepts/*.mdxcontent/docs/specifications/**/*.mdxcontent/docs/index.mdxThis configuration issue needs to be resolved separately for the documentation site to function properly. Once fixed, the "Copy as Markdown" feature will work as intended.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.