Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add AI Toolbar #2673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
pwizla merged 15 commits into main from repo/ai-toolbar
Sep 3, 2025
Merged

Add AI Toolbar #2673

pwizla merged 15 commits into main from repo/ai-toolbar
Sep 3, 2025

Conversation

@pwizla
Copy link
Collaborator

@pwizla pwizla commented Aug 12, 2025
edited
Loading

This PR creates an extensible "AI toolbar" system.
The toolbar is displayed below h1 items, and includes a few actions:

  • copy Markdown code
  • view LLMs.txt
  • view LLMs-full.txt

The architecture is flexible enough to accept more buttons.
The code includes:

  • an actions folder, with dedicated and reusable actions (for now, we have one to copy the Markdown, and another one to navigate to another page)
  • a config folder which for now only includes one config. file, where you can define the buttons details (icon, title, description, etc.)

The Heading component from Docusaurus has been swizzled to include the AiToolbar rendering, which means the toolbar is rendered whenever an h1 is rendered.

A useBadgeReorder hook has also been created to ensure badges added below an h1 (<EnterpriseBadge /> and so on) are rendered in this order: 1. h1, 2. badges (within a container), and 3. AiToolbar component. Without this hook, the toolbar is rendered in between h1 and badges, which was not really reflecting the originally intended design for the h1s and associated badges.

As a bonus, the PR finally introduces a DebugComponent that can be used to test various scenarios while developing custom components.

AiToolbar.demo.mov

pwizla added 13 commits August 12, 2025 11:21
Copy link

vercel bot commented Aug 12, 2025
edited
Loading

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Project Deployment Preview Comments Updated (UTC)
documentation Ready Preview Comment Aug 14, 2025 1:47pm

@pwizla pwizla self-assigned this Aug 13, 2025
@pwizla pwizla added this to the 6.6.8 milestone Aug 13, 2025
@pwizla pwizla added source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo pr: chore pr: new content PRs for new product features or new documentation sections and removed pr: chore labels Aug 13, 2025
@pwizla pwizla added the flag: don't merge This PR should not be merged at the moment label Aug 13, 2025
@pwizla pwizla removed the flag: don't merge This PR should not be merged at the moment label Sep 3, 2025
@pwizla pwizla merged commit a843b61 into main Sep 3, 2025
4 of 5 checks passed
@pwizla pwizla deleted the repo/ai-toolbar branch September 3, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@meganelacheny meganelacheny Awaiting requested review from meganelacheny meganelacheny is a code owner

Labels

pr: new content PRs for new product features or new documentation sections source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo

Projects

None yet

Milestone

6.8.0

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /