Skip to content

docs: expand details for global CLI anchor links - #2715

Merged
fengmk2 merged 1 commit into
voidzero-dev:mainfrom
liangmiQwQ:liang/codex/fix-docs-details-anchors
Sep 15, 2026
Merged

fengmk2 merged 1 commit into
voidzero-dev:mainfrom
liangmiQwQ:liang/codex/fix-docs-details-anchors

Conversation

@liangmiQwQ

Copy link
Copy Markdown
Collaborator

The Global CLI page lists environment-variable headings in its outline even when the enclosing details block is collapsed. Clicking those links leaves the content hidden and scrolls to the wrong position.

Add a page-local script that opens enclosing details blocks and scrolls to the heading with VitePress's configured offset. It handles direct links, hash changes, and clicking the current outline link again after collapsing the block, and removes its listeners when leaving the page.

This adapts VitePress maintainer brc-dd's suggested script to headings inside details blocks.

🤖 Generated with Codex

@fengmk2 fengmk2 added the docs-preview Request a docs preview of the current fork PR commit; reapply after updates. label Sep 15, 2026
@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-15T12:47:04.378532Z 2e0ad30 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 2e0ad30fc1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@liangmiQwQ
liangmiQwQ marked this pull request as ready for review September 15, 2026 12:47
@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare documentation preview: https://pr-2715-viteplus-dev.voidzero-docs.workers.dev

Commit: 2e0ad30

@liangmiQwQ liangmiQwQ changed the title fix(docs): expand details for global CLI anchor links docs: expand details for global CLI anchor links Sep 15, 2026
@fengmk2

fengmk2 commented Sep 15, 2026

Copy link
Copy Markdown
Member

it works ! https://pr-2715-viteplus-dev.voidzero-docs.workers.dev/guide/global-cli#nushell-and-xdg-directories

@fengmk2
fengmk2 merged commit 01f5578 into voidzero-dev:main Sep 15, 2026
70 of 71 checks passed
@liangmiQwQ
liangmiQwQ deleted the liang/codex/fix-docs-details-anchors branch September 15, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-preview Request a docs preview of the current fork PR commit; reapply after updates.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants