Skip to content

vitepress 2 - #2777

Merged
posva merged 3 commits into
mainfrom
docs/vitepress-2
Aug 11, 2026
Merged

vitepress 2#2777
posva merged 3 commits into
mainfrom
docs/vitepress-2

Conversation

@posva

@posva posva commented Aug 11, 2026

Copy link
Copy Markdown
Member

Close #2746

Summary by CodeRabbit

  • Documentation
    • Improved English and Chinese installation guides with more reliable CDN URL examples.
    • Enhanced code examples with improved syntax highlighting and synchronous type information.
    • Updated documentation tooling for improved compatibility and maintenance.
  • Chores
    • Removed an outdated version override from workspace configuration.

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for vue-router ready!

Name Link
🔨 Latest commit 37ec32e
🔍 Latest deploy log https://app.netlify.com/projects/vue-router/deploys/6a7b2da0b95e31000859485a
😎 Deploy Preview https://deploy-preview-2777--vue-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 82 (🔴 down 8 from production)
Accessibility: 97 (no change from production)
Best Practices: 83 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c95dae1e-85ea-4044-a1b3-630201da9e9f

📥 Commits

Reviewing files that changed from the base of the PR and between a8ff3c2 and 37ec32e.

📒 Files selected for processing (1)
  • packages/docs/.vitepress/config/shared.ts

📝 Walkthrough

Walkthrough

The installation guides now use optional chaining for CDN package-version lookups. Documentation tooling dependencies were upgraded, the VitePress Vite override was removed, and Twoslash language preloading was configured.

Changes

Documentation updates

Layer / File(s) Summary
Safe CDN version interpolation
packages/docs/installation.md, packages/docs/zh/installation.md
CDN import-map and global-build templates now use optional chaining when reading configured package versions.
Documentation tooling configuration
packages/docs/package.json, packages/docs/.vitepress/config/shared.ts, pnpm-workspace.yaml
Documentation tooling dependencies were upgraded. The shared Markdown configuration preloads Vue, TypeScript, and JavaScript languages. The VitePress Vite override was removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • vuejs/router#2659: Both PRs modify installation documentation and shared VitePress configuration.
  • vuejs/router#2719: Both PRs modify Chinese installation CDN templates that use packageVersions.
  • vuejs/router#2776: Both PRs modify VitePress and Vite dependency configuration.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title references VitePress but does not clearly describe the primary change, which is preloading Shiki languages for Twoslash hovers. Use a specific title such as "Preload Shiki languages for Twoslash hovers".
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/vitepress-2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/vue-router@2777
npm i https://pkg.pr.new/vue-router@2777
yarn add https://pkg.pr.new/vue-router@2777.tgz

commit: 37ec32e

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.58%. Comparing base (658b2de) to head (37ec32e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2777      +/-   ##
==========================================
+ Coverage   85.56%   85.58%   +0.02%     
==========================================
  Files          74       74              
  Lines        5846     5843       -3     
  Branches     1851     1850       -1     
==========================================
- Hits         5002     5001       -1     
+ Misses        744      743       -1     
+ Partials      100       99       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/docs/package.json`:
- Line 19: Update the VitePress 2 configuration by replacing
themeConfig.outlineTitle with themeConfig.outline.label and renaming
markdown.attrs.leftDelimiter/rightDelimiter to left/right. Then validate the
changes with pnpm --filter `@vue/router-docs` docs:build.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f2faad7-0a74-45b3-a1a1-38f9d8a456b5

📥 Commits

Reviewing files that changed from the base of the PR and between 17b5861 and a8ff3c2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • packages/docs/installation.md
  • packages/docs/package.json
  • packages/docs/zh/installation.md
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (1)
  • pnpm-workspace.yaml

"typedoc-vitepress-theme": "^1.1.3",
"vitepress": "1.6.4",
"vitepress-plugin-group-icons": "^1.7.5",
"vitepress": "2.0.0-alpha.19",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n \
  'lastUpdatedText|outlineTitle|lazyLoading|cjkFriendly|markdown\.attrs\.disable|markdown\.emoji\.defs|useData\(\)\.hash' \
  packages/docs/.vitepress packages/docs

Repository: vuejs/router

Length of output: 217


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- docs package scripts ---'
cat packages/docs/package.json

printf '%s\n' '--- VitePress configuration files ---'
find packages/docs/.vitepress -maxdepth 3 -type f -print | sort

printf '%s\n' '--- affected identifiers with context ---'
rg -n -C 3 \
  'lastUpdatedText|outlineTitle|lazyLoading|cjkFriendly|markdown\.attrs\.disable|markdown\.emoji\.defs|useData\(\)\.hash' \
  packages/docs/.vitepress packages/docs

printf '%s\n' '--- repository typecheck/build scripts ---'
rg -n -C 2 \
  '"(typecheck|type-check|build|docs|lint)"\s*:|vitepress|vue-tsc|tsc' \
  package.json packages/*/package.json pnpm-workspace.yaml 2>/dev/null || true

Repository: vuejs/router

Length of output: 9163


🌐 Web query:

VitePress 2.0.0-alpha.19 CHANGELOG.md outlineTitle breaking changes

💡 Result:

The outlineTitle configuration option was deprecated and replaced well before the VitePress 2.0.0-alpha.19 release [1]. The outlineTitle property, which was previously used to customize the title displayed above the outline links, was replaced by the themeConfig.outline.label property in 2023 [1]. This change was part of a broader consolidation where themeConfig.outline became an object capable of holding both the heading levels and the label (title) [2][1]. There are no specific breaking changes related to outlineTitle in the VitePress 2.0.0-alpha.19 changelog, as the deprecation occurred earlier in the project's history [1]. If you are migrating to VitePress 2.0 and still using outlineTitle, you should update your configuration to use the outline object: // Before themeConfig: { outlineTitle: 'On this page' } // After themeConfig: { outline: { label: 'On this page' } } You can refer to the official VitePress Default Theme Config documentation for the current structure of the outline configuration [2].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- Chinese theme configuration ---'
cat -n packages/docs/.vitepress/config/zh.ts | sed -n '1,55p'

printf '%s\n' '--- Shared and English theme configuration ---'
cat -n packages/docs/.vitepress/config/shared.ts | sed -n '1,120p'
cat -n packages/docs/.vitepress/config/en.ts | sed -n '1,70p'

printf '%s\n' '--- VitePress alpha.19 changelog references ---'
curl -fsSL https://raw.githubusercontent.com/vuejs/vitepress/v2.0.0-alpha.19/CHANGELOG.md |
  rg -n -C 3 'outlineTitle|themeConfig|markdown|Breaking|breaking' | head -200

printf '%s\n' '--- VitePress default-theme config references ---'
curl -fsSL https://raw.githubusercontent.com/vuejs/vitepress/v2.0.0-alpha.19/src/node/config.ts |
  rg -n -C 3 'outlineTitle|outline|label' | head -120

Repository: vuejs/router

Length of output: 35524


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path

root = Path("packages/docs/.vitepress")
patterns = {
    "themeConfig.outlineTitle": ("outlineTitle",),
    "themeConfig.lastUpdatedText": ("lastUpdatedText",),
    "markdown.attrs.disable": ("disable",),
    "markdown.attrs.leftDelimiter": ("leftDelimiter",),
    "markdown.attrs.rightDelimiter": ("rightDelimiter",),
    "markdown.cjkFriendly": ("cjkFriendly",),
    "markdown.image.lazyLoading": ("lazyLoading",),
    "markdown.codeCopyButtonTitle": ("codeCopyButtonTitle",),
    "markdown.emoji.defs": ("defs",),
    "useData().hash": ("useData().hash",),
}
for label, needles in patterns.items():
    matches = []
    for path in sorted(root.rglob("*")):
        if path.is_file():
            text = path.read_text(errors="replace").splitlines()
            for number, line in enumerate(text, 1):
                if any(needle in line for needle in needles):
                    matches.append(f"{path}:{number}:{line.strip()}")
    if matches:
        print(f"[{label}]")
        print("\n".join(matches))
PY

printf '%s\n' '--- delimiter syntax usage in documentation ---'
rg -n -C 2 '%\{' packages/docs --glob '!packages/docs/.vitepress/config/shared.ts' || true

printf '%s\n' '--- all markdown.attrs configuration ---'
rg -n -A 12 -B 3 'markdown:\s*\{|attrs:\s*\{' packages/docs/.vitepress

Repository: vuejs/router

Length of output: 3186


Update the VitePress 2 configuration before merging.

  • Replace themeConfig.outlineTitle with themeConfig.outline.label.
  • Rename markdown.attrs.leftDelimiter and markdown.attrs.rightDelimiter to left and right.
    The docs package has no typecheck script. Run pnpm --filter @vue/router-docs docs:build after these changes.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/docs/package.json` at line 19, Update the VitePress 2 configuration
by replacing themeConfig.outlineTitle with themeConfig.outline.label and
renaming markdown.attrs.leftDelimiter/rightDelimiter to left/right. Then
validate the changes with pnpm --filter `@vue/router-docs` docs:build.

@posva
posva merged commit 7628119 into main Aug 11, 2026
10 checks passed
@posva
posva deleted the docs/vitepress-2 branch August 11, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant