Support built-in copy button component for page #3646
Closed
100gle
started this conversation in
Feature Requests
Replies: 1 comment 1 reply
-
|
Thanks for the feedback 🙌 We definitely encourage a plugin approach for this kind of feature and it turns out there is already a plugin for such functionality: https://github.com/corsfix/starlight-contextual-menu
A live example is also available here. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
What version of
starlightare you using?latest
What is your idea?
Add a native built-in button component to copy page content.
Here an example from Mintlify:
Why is this feature necessary?
Yes. AI-assisted development (using LLMs/Agents) is becoming more popular. Recently, while rebuilding my blog with Astro, I noticed that LLMs often provide outdated or incorrect solutions due to training data cutoffs or the rapid evolution of the Astro ecosystem.
To get working code, I frequently have to copy sections of the official Astro documentation to provide context to the LLM. However, pasting raw HTML or visually selected text often consumes unnecessary tokens or loses formatting. I currently resort to tools like
r.jina.ai(A formatter service made by Jina) to render pages into Markdown for the model.While I am aware of solutions like MCP (Model Context Protocol) or specific tools designed to fetch context, I find them a bit cumbersome for day-to-day use. Relying on external agents or configuring MCP servers introduces unnecessary friction and context switching. A native, on-page solution would be significantly faster and more streamlined.
I believe Starlight would benefit significantly from natively supporting a "Copy as Markdown" feature or an LLM-optimized view.
Similar to how Mintlify offers options to copy context for LLMs, Starlight could provide a button that copies the current page's content in a clean, token-efficient Markdown format. This would allow developers to instantly provide the "ground truth" to their AI assistant, reducing hallucinations and interaction time.
Do you have examples of this feature in other projects?
No response
Participation
Beta Was this translation helpful? Give feedback.
All reactions