Feature Request: Add Copy Page Button for people + LLMs
Have you read the Contributing Guidelines on issues?
- [x] I have read the Contributing Guidelines on issues.
Description
This is all the rage now. Example: https://mintlify.com/docs/quickstart
Ideally we could have the same options, or a configurable set of LLMs.
Considerations:
- Need to strip comments and images from final markdown before it's exposed to people.
- Could either load the whole thing into the built page as data on the copy button, or use the mintlify approach of building a clean .md exposed publicly.
Has this been requested on Canny?
No response
Motivation
Getting popular in doc systems.
API design
No response
Have you tried building it?
No response
Self-service
- [ ] I'd be willing to contribute this feature to Docusaurus myself.
If you are setting up a RAG aren't you better off just dumping the entire site's content into its knowledge base rather than piecemeal for each page? Docusaurus sites are usually open source and are already authored in Markdown, so this step should take minimal efforts compared to what you are proposing, which requires much more client side logic and/or data. We are also looking into creating llm.txt which AFAIK is also a standard these days.
Hi 👋, I’d love to work on this feature if it’s still open!
Adding a “Copy Page” button sounds really useful both for users and LLMs. I’d be happy to explore the UI/UX and handle the logic for copying the entire page content to clipboard.
Let me know if there's any preferred location for the button or design guidelines I should follow before I get started.
Thanks!
Hi , I’d like to work on this feature. From my understanding, the goal is to add a “Copy Page” button that generates a clean markdown version (without comments and images) for both people and LLMs. My proposed approach:
Generate clean markdown on page load.
Store it in a hidden JSON/script block.
On button click, use the Clipboard API to copy it.
Would you prefer this inline approach, or a Mintlify-style .md export instead?
In case your interested, i actually started the work for this. You can find my related comment about it here: https://github.com/facebook/docusaurus/issues/10899#issuecomment-3368137697
I currently have an alpha version out for the new version of the plugin/theme to include generating standalone markdown files, llms.txt and llms-full.txt, and rendering a Copy Button on a page that has generated markdown to accompany it.
If you would like help contribute or make suggestions, feel free! https://github.com/signalwire/docusaurus-plugins
Is anyone developing this feature this will be very useful feature. Also build /llm.txt and /llms-full.txt
https://github.com/FlyNumber/markdown_docusaurus_plugin