Repository navigation
feat: add OneTag AI "ask this page" plugin - #2861
Closed
fengyiqicoder wants to merge 1 commit into
Closed
fengyiqicoder wants to merge 1 commit into
fengyiqicoder wants to merge 1 commit into
Conversation
Adds an optional plugin that loads the OneTag AI widget: visitors type a question and get an answer drawn from the page they are reading. Nothing is loaded unless a key is set in `$docsify.onetag`. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017g16kS8U6SzeKsAZguBPEn
|
@fengyiqicoder is attempting to deploy a commit to the Docsify Team on Vercel. A member of the Team first needs to authorize it. |
sy-records
requested changes
Nov 13, 2026
sy-records
left a comment
Member
There was a problem hiding this comment.
Thank you for your contribution.
However, this isn't suitable for commit to this repository; you can publish it yourself and add it to the showcase.
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 an optional
onetagplugin next todisqus,gitalkandgtag. It puts an "ask this page" button on the site: a visitor types a question and gets an answer drawn from the page they are reading. I am the author of OneTag AI.dist/plugins/; core is untouched, and nothing is loaded unless a site adds the plugin and sets a key..markdown-section(not the sidebar or navbar) andref=docsify(which integration loaded the widget). Nothing is sent before that, and the widget sets no cookies.$docsify.onetagtakes the key as a string, or an object with the widget options (title, theme, color and so on).core-darkTested on a docsify site built from this branch: questions across a sidebar navigation and an in-page anchor, the dark add-on, phone width (the button does not cover the sidebar toggle), the plugin without a key (one console error, nothing loaded).
npm run lint,npm run typecheck, Jest and the Chromium e2e suite pass locally, exceptsearch.test.js:285, which is flaky here with and without this change.Related issue, if any:
None.
What kind of change does this PR introduce?
For any code change,
Does this PR introduce a breaking change?
Tested in the following browsers:
🤖 Generated with Claude Code
https://claude.ai/code/session_017g16kS8U6SzeKsAZguBPEn