Skip to content

Default Setup

This page demonstrates the plugin with the default configuration — no options passed.

plugins: [starlightPageContextAction()];

Look at the right sidebar. Above the table of contents, you should see:

  1. Copy page — Click to copy this page’s markdown source to your clipboard.
  2. Open in Chat — Click to expand a dropdown with links to ChatGPT, Claude, and T3 Chat.
  3. Scroll to top — Click to smoothly scroll back to the top of the page.

Click the Copy page button in the sidebar. The icon will change to a checkmark for 3 seconds to confirm the content was copied. Paste the copied text into any editor to verify it contains the raw markdown of this page.

Click the Open in Chat button to reveal the dropdown. Each link opens in a new tab with the default prompt:

Read src/content/docs/examples/default.mdx. I want to ask questions about it.

The {url} placeholder is replaced with this page’s URL automatically.

Resize your browser to a mobile width (below 50rem). You should see a “Page Actions” toggle in the mobile bar alongside the “On this page” toggle. Tapping it reveals a dropdown with all enabled actions. Opening one dropdown automatically closes the other.

The following headings exist to verify that page actions appear correctly above a populated table of contents.

Content for section A. This helps demonstrate that the table of contents still works normally alongside page actions.

Content for section B. The plugin does not interfere with any existing Starlight features.

Content for section C. Both page actions and the table of contents are visible in the right sidebar.