Skip to content

Migrate docs from VuePress 1.x to VitePress + add CI#347

Open
Ntnelbaba wants to merge 8 commits into
masterfrom
feature/vitepress-migration
Open

Migrate docs from VuePress 1.x to VitePress + add CI#347
Ntnelbaba wants to merge 8 commits into
masterfrom
feature/vitepress-migration

Conversation

@Ntnelbaba

@Ntnelbaba Ntnelbaba commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Migrate the docs site from VuePress 1.9 (EOL, broken on Node 24) to VitePress.
  • Keep src/ as the docs root; config now at src/.vitepress/config.ts.
  • Port nav, 21 sidebars, theme (GTM noscript, Badge, \$withBase), styles, and 115 public assets.
  • Drop PWA plugin (dev docs don't need offline).
  • cleanUrls: true replaces vuepress-plugin-clean-urls; SEO relies on VitePress defaults + frontmatter.
  • .nvmrc -> v20.17.0 (Node 20 LTS, VitePress-supported).

CI

  • ci.yml - build on PR and push to master.
  • preview.yml - per-PR preview deploy to the gh-pages branch under preview/pr-<n>/, sticky PR comment with the URL, cleanup on PR close.
  • auto-dispatch.yaml - the existing repository-dispatch to the devops repo now runs only after a passing build job (needs: [build]).

Link fixes during migration

~200 markdown files updated for VitePress cleanUrls (removed /index suffixes, trailing slashes on file links). Dead links removed in js/*.md (pages that never existed: commands-methods/getall, hooks/ui, hooks/data, command-base.full). Confirm those were genuinely dead and not pages that should exist.

Action required after merge

  1. Enable GitHub Pages on the gh-pages branch (root) in repo settings - previews won't resolve until then.
  2. Verify first preview URL: https://elementor.github.io/elementor-developers-docs/preview/pr-<number>/.
  3. Production path unchanged: devops dispatch builds with BASE=1 -> /docs/.

Verification

Test plan

  • Review the preview deploy workflow on this PR - a sticky comment with the preview URL should appear.
  • Spot-check 2-3 sidebar sections render correctly (e.g. widgets/, controls/, data-structure/).
  • Confirm the js/*.md dead-link removals are correct.

Made with Cursor

✨ PR Description

1. Problem & Context

Migrate documentation site from VuePress 1.x (deprecated) to VitePress (modern, Vue 3 + Vite stack) and establish CI/CD for build verification and PR previews. Unblocks ongoing docs maintenance and adds automated deployment gates.

2. What Changed (Where)

Category Changes
Framework package.json: VuePress 1.9.7 → VitePress 1.6.4; removed PWA, SEO, clean-urls plugins
Config src/.vitepress/config.ts: ESM module, TypeScript, runtime BASE resolution (env-driven for previews/prod), cleanUrls: true (breaks .md extensions in links)
Theme src/.vitepress/theme/: custom Badge component, global styles (Elementor pink brand), GTM noscript injection
Navigation 18 sidebar modules (TypeScript) replacing CommonJS requires; nav structure preserved
CI/CD .github/workflows/: new ci.yml (build check), preview.yml (per-PR deployment to gh-pages), updated auto-dispatch.yaml (build job + release dispatch)
Docs README.md, AGENTS.md: updated dev instructions; ~200 Markdown links converted from /page/ to /page (VitePress cleanUrls)
Node .nvmrc: v16.20.2 → v20.17.0 (LTS; required by VitePress 1.6+)

3. How It Works

Config resolution: BASE inferred at runtime from BASE_URL (PR preview), BASE=1 (production /docs/), or / (local dev). Sidebar modules use TypeScript DefaultTheme.SidebarItem[] types. CI triggers on PR/push; preview workflow deploys to gh-pages/preview/pr-<n>/ with sticky comment metadata and cleanup on close. All internal links must drop .md extensions and trailing /index (VitePress constraint).

4. Risks

  • Link migration incomplete: ~200 Markdown files have trailing slashes removed (e.g., /page//page), but no automated validation that all internal refs updated. Recommend link-check in CI.
  • Base path logic: three-branch resolution (BASE_URL > BASE=1 > /) is fragile if env accidentally set; devops team must coordinate dispatch contract (already noted in AGENTS.md).
  • Plugin ecosystem swap: PWA, SEO, clean-urls dropped; VitePress built-ins may not 1:1 replace. No migration guide provided to content team for future maintenance.
  • Node 20 LTS: breaking for contributors on old envs; mitigated by .nvmrc + nvm workflow docs, but CI will fail silently if node-version-file not respected.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

Ntnelbaba and others added 2 commits July 22, 2026 15:05
Replace VuePress 1.9.7 with VitePress 1.6.4, port config/sidebars/theme,
and update internal links for clean URL compatibility.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add CI build on PR/master, PR preview deploys to gh-pages, and gate
release dispatch behind a successful build.

Co-authored-by: Cursor <cursoragent@cursor.com>
@wiz-9a149474ff

wiz-9a149474ff Bot commented Jul 22, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations 1 Low
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Comment thread .github/workflows/ci.yml
Comment on lines +13 to +34
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: src/.vitepress/dist
run: npm run build

- name: Deploy preview to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Comment thread .github/workflows/preview.yml Fixed
@github-actions

Copy link
Copy Markdown

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Ntnelbaba
Ntnelbaba temporarily deployed to pr-347 July 22, 2026 12:16 — with GitHub Actions Inactive
…h-pages subpath

Co-authored-by: Cursor <cursoragent@cursor.com>
@Ntnelbaba
Ntnelbaba temporarily deployed to pr-347 July 22, 2026 12:18 — with GitHub Actions Inactive
Co-authored-by: Cursor <cursoragent@cursor.com>
@Ntnelbaba
Ntnelbaba temporarily deployed to pr-347 July 22, 2026 12:23 — with GitHub Actions Inactive
…ssets to dist

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants