Skip to content

Upgrade VitePress to v2 alpha#8975

Open
tagliala wants to merge 1 commit intomasterfrom
chore/vitepress-2-refactor
Open

Upgrade VitePress to v2 alpha#8975
tagliala wants to merge 1 commit intomasterfrom
chore/vitepress-2-refactor

Conversation

@tagliala
Copy link
Contributor

Additionally:

  • Move v3 docs to subfolder
  • Ignore VitePress cache directory in ESLint
  • Remove CNAME because it is not needed anymore and ignored when publishing from a custom GitHub Actions workflow

@tagliala tagliala force-pushed the chore/vitepress-2-refactor branch from 091db7d to 083adae Compare March 20, 2026 22:44
@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.08%. Comparing base (070f18c) to head (04345b0).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8975   +/-   ##
=======================================
  Coverage   99.08%   99.08%           
=======================================
  Files         139      139           
  Lines        4046     4046           
=======================================
  Hits         4009     4009           
  Misses         37       37           

☔ View full report in Codecov by Sentry.
📢 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.

@tagliala tagliala force-pushed the chore/vitepress-2-refactor branch from 083adae to 87c39fd Compare March 20, 2026 23:03
@tagliala tagliala requested a review from Copilot March 20, 2026 23:05
@tagliala tagliala force-pushed the chore/vitepress-2-refactor branch from 87c39fd to 04967c2 Compare March 20, 2026 23:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the documentation site toolchain to VitePress v2 alpha and restructures the documentation content so the “v3” docs live under a /v3/ subpath, alongside small housekeeping for linting/publishing.

Changes:

  • Upgrade vitepress dependency to ^2.0.0-alpha.17 (and update lockfile dependency graph accordingly).
  • Move the existing docs content into docs/v3/ and update homepage links to point to /v3/....
  • Ignore the VitePress cache directory in ESLint and remove the docs/CNAME file.

Reviewed changes

Copilot reviewed 7 out of 29 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
yarn.lock Updates dependency resolutions due to the VitePress v2 alpha upgrade.
package.json Bumps vitepress to ^2.0.0-alpha.17.
eslint.config.js Adds docs/.vitepress/cache/** to ESLint ignores.
docs/index.md Updates home page links to point to /v3/... docs paths.
docs/CNAME Removes the CNAME file as it’s no longer needed in the publishing workflow.
docs/.vitepress/config.js Updates VitePress theme config nav/version handling for the new docs structure.
docs/v3/index.md Adds a v3-specific home page under /v3/.
docs/v3/documentation.md Adds a redirect/removal notice page for the old “documentation” entry.
docs/v3/config.js Introduces v3-specific theme config (nav/sidebar/editLink).
docs/v3/0-installation.md Adds v3 installation guide content under /v3/.
docs/v3/1-general-configuration.md Adds v3 general configuration docs under /v3/.
docs/v3/2-resource-customization.md Adds v3 resource customization docs under /v3/.
docs/v3/3-index-pages.md Adds v3 index pages overview under /v3/.
docs/v3/3-index-pages/custom-index.md Adds v3 custom index page docs under /v3/.
docs/v3/3-index-pages/index-as-block.md Adds v3 “index as block” docs under /v3/.
docs/v3/3-index-pages/index-as-blog.md Adds v3 “index as blog” docs under /v3/.
docs/v3/3-index-pages/index-as-grid.md Adds v3 “index as grid” docs under /v3/.
docs/v3/3-index-pages/index-as-table.md Adds v3 “index as table” docs under /v3/.
docs/v3/4-csv-format.md Adds v3 CSV docs under /v3/.
docs/v3/5-forms.md Adds v3 forms docs under /v3/.
docs/v3/6-show-pages.md Adds v3 show page docs under /v3/.
docs/v3/7-sidebars.md Adds v3 sidebar docs under /v3/.
docs/v3/8-custom-actions.md Adds v3 custom actions docs under /v3/.
docs/v3/9-batch-actions.md Adds v3 batch actions docs under /v3/.
docs/v3/10-custom-pages.md Adds v3 custom pages docs under /v3/.
docs/v3/11-decorators.md Adds v3 decorators docs under /v3/.
docs/v3/12-arbre-components.md Adds v3 Arbre components docs under /v3/.
docs/v3/13-authorization-adapter.md Adds v3 authorization adapter docs under /v3/.
docs/v3/14-gotchas.md Adds v3 gotchas docs under /v3/.

Additionally:
- Move v3 docs to subfolder
- Ignore VitePress cache directory in ESLint
- Remove CNAME because it is not needed anymore and ignored when
  publishing from a custom GitHub Actions workflow
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 29 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

docs/.vitepress/config.js:61

  • themeConfig.sidebar was removed from the main VitePress config. With the current docs/.vitepress/config.js, VitePress will not render a sidebar for the /v3/* pages unless the sidebar config is defined here (e.g., via a path-keyed sidebar map like {'/v3/': [...]}) or otherwise explicitly merged in at build time.
  themeConfig: {
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: 'Guide', link: '/v3/0-installation' },
      { text: 'Discuss', link: 'https://github.com/activeadmin/activeadmin/discussions' },
      {
        text: 'Demo',
        items: [
          { text: 'GitHub Repository', link: 'https://github.com/activeadmin/demo.activeadmin.info' },
          { text: 'Demo App', link: 'https://demo.activeadmin.info/' },
        ]
      },
      {
        text: 'v3.x', // use Ruby format for version text
        items: [
          {
            text: 'v3.x',
            link: '/v3/0-installation'
          },
          {
            text: 'Changelog',
            link: 'https://github.com/activeadmin/activeadmin/releases',
          },
          {
            text: 'Contributing',
            link: 'https://github.com/activeadmin/activeadmin/blob/master/CONTRIBUTING.md',
          },
        ],
      }
    ],
    socialLinks: [
      { icon: 'github', link: 'https://github.com/activeadmin/activeadmin' },
      { icon: 'slack', link: 'https://activeadmin.slack.com/' },
    ],
    editLink: {
      pattern: 'https://github.com/activeadmin/activeadmin/edit/master/docs/:path',
      text: 'Edit this page on GitHub'
    },
    footer: {
      message: 'Released under the MIT License.',
      copyright: 'Copyright © 2010-present'
    },
    search: {
      provider: 'local'
    }
  }

Comment on lines +1 to +8
import { defineAdditionalConfig } from 'vitepress'

export default defineAdditionalConfig({
themeConfig: {
nav: [
{ text: 'Guide', link: '/v3/0-installation' },
{ text: 'Discuss', link: 'https://github.com/activeadmin/activeadmin/discussions' },
{
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This file defines sidebar/nav config for the v3 docs, but it is not referenced from docs/.vitepress/config.js and there’s no other code in the repo that imports it. If VitePress v2 isn’t auto-loading docs/v3/config.js, these settings will be ignored and /v3/* pages will lose their sidebar navigation. Consider moving this into the main config (path-keyed sidebar) or wiring it in explicitly.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's working

image

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.

2 participants