Add 'Copy page' button to fetch and copy raw Markdown#5
Open
zamal-db wants to merge 1 commit intokrypticmouse:masterfrom
Open
Add 'Copy page' button to fetch and copy raw Markdown#5zamal-db wants to merge 1 commit intokrypticmouse:masterfrom
zamal-db wants to merge 1 commit intokrypticmouse:masterfrom
Conversation
|
Someone is attempting to deploy a commit to the DSPy Team on Vercel. A member of the Team first needs to authorize it. |
Adds a clipboard button next to the existing 'Edit this page' action on every documentation page. Clicking it fetches the raw Markdown source from GitHub and copies it to the user's clipboard. - New file: docs/js/copy-as-markdown.js - Minimal CSS additions in docs/stylesheets/extra.css - Registered script in mkdocs.yml extra_javascript
9ac4dda to
25abe51
Compare
Owner
|
Hi @zamal-db Thank you so much for the PR! We usually avoid making PRs to this repo can you please make these additions in the main repo here instead: https://github.com/stanfordnlp/dspy/tree/main/docs Any changes you make there will be automatically synced here and this repo is mostly for vercel deployment. |
Author
|
Thanks for the pointer! I've opened the PR on the main repo instead: stanfordnlp/dspy#9327 |
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
Adds a Copy page button ( icon + label) next to the Edit this page link on every doc page. One click fetches the raw Markdown source from GitHub and copies it to the clipboard.
Motivation
Users working with LLMs or note-taking tools often need raw Markdown of a doc page. Today the only way is: Edit this page GitHub Raw manually copy. This button does it in one click.
Changes
docs/js/copy-as-markdown.js.mdpath from edit link, fetches fromraw.githubusercontent.com, copies via Clipboard API, shows feedbackdocs/stylesheets/extra.cssmkdocs.ymlextra_javascriptHow it works
hrefto resolve the exact.mdpathraw.githubusercontent.com/stanfordnlp/dspy/main/docs/docs/.../index.mdfor directory-style pagesdocument$.subscribe)Testing
mkdocs build/python -m http.server