Migrate docs from VuePress 1.x to VitePress + add CI#347
Open
Ntnelbaba wants to merge 8 commits into
Open
Conversation
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 Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
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 |
|
Preview deployed to https://elementor.github.io/elementor-developers-docs/preview/pr-347/ |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…h-pages subpath Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ssets to dist Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/as the docs root; config now atsrc/.vitepress/config.ts.\$withBase), styles, and 115 public assets.cleanUrls: truereplacesvuepress-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 thegh-pagesbranch underpreview/pr-<n>/, sticky PR comment with the URL, cleanup on PR close.auto-dispatch.yaml- the existingrepository-dispatchto 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/indexsuffixes, trailing slashes on file links). Dead links removed injs/*.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
gh-pagesbranch (root) in repo settings - previews won't resolve until then.https://elementor.github.io/elementor-developers-docs/preview/pr-<number>/.BASE=1->/docs/.Verification
Test plan
widgets/,controls/,data-structure/).js/*.mddead-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)
package.json: VuePress 1.9.7 → VitePress 1.6.4; removed PWA, SEO, clean-urls pluginssrc/.vitepress/config.ts: ESM module, TypeScript, runtimeBASEresolution (env-driven for previews/prod),cleanUrls: true(breaks.mdextensions in links)src/.vitepress/theme/: custom Badge component, global styles (Elementor pink brand), GTM noscript injection.github/workflows/: newci.yml(build check),preview.yml(per-PR deployment to gh-pages), updatedauto-dispatch.yaml(build job + release dispatch)README.md,AGENTS.md: updated dev instructions; ~200 Markdown links converted from/page/to/page(VitePress cleanUrls).nvmrc: v16.20.2 → v20.17.0 (LTS; required by VitePress 1.6+)3. How It Works
Config resolution:
BASEinferred at runtime fromBASE_URL(PR preview),BASE=1(production/docs/), or/(local dev). Sidebar modules use TypeScriptDefaultTheme.SidebarItem[]types. CI triggers on PR/push; preview workflow deploys togh-pages/preview/pr-<n>/with sticky comment metadata and cleanup on close. All internal links must drop.mdextensions and trailing/index(VitePress constraint).4. Risks
/page/→/page), but no automated validation that all internal refs updated. Recommend link-check in CI.BASE_URL>BASE=1>/) is fragile if env accidentally set; devops team must coordinate dispatch contract (already noted in AGENTS.md)..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