Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 19, 2026

Current CLI-created projects reference @objectdocs/site via workspace protocol, creating uncertainty around Vercel deployment. Need standalone example using published npm packages to validate deployment path.

Changes

Example Project Structure

  • example/ - Complete standalone project using @objectdocs/cli@^0.2.11 from npm
  • Sample MDX content with frontmatter and Fumadocs components
  • Vercel deployment configuration (vercel.json)
  • Package configuration demonstrating correct dependency resolution

Documentation (1,658 lines)

  • README.md - Quick start and deployment instructions
  • ARCHITECTURE.md - Technical explanation of @objectdocs/site resolution strategy
  • VERCEL.md - Deployment guide with troubleshooting
  • TESTING.md - Standalone testing procedures outside monorepo
  • INDEX.md - Bilingual overview (EN/中文)

Validation Tooling

  • validate.sh - Automated checks for package config, content structure, frontmatter, and deployment settings

Key Findings

Current architecture is correct. When published, workspace:* converts to proper version:

// CLI resolution (dev.mjs, build.mjs)
let nextAppDir;
try {
  nextAppDir = path.dirname(require.resolve('@objectdocs/site/package.json'));
} catch (e) {
  nextAppDir = path.resolve(__dirname, '../../../site'); // fallback
}

Verified via npm view @objectdocs/cli dependencies:

{
  "@objectdocs/site": "0.2.11"  // ✓ correct, not "workspace:*"
}

Vercel deployment works with standard npm dependency resolution. No architectural changes needed.

Usage

cd example
pnpm install
bash validate.sh  # verify setup
pnpm build        # test build

For standalone testing outside monorepo:

cp -r example /tmp/test && cd /tmp/test
pnpm install && pnpm build
Original prompt

考虑换一种方式引用 @objectdocs/site, 目前使用 cli 创建的项目vercel 无法部署。请写一个 example 文件夹代表cli 创建的项目运行模式,方便我测试确认


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link

vercel bot commented Jan 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
objectdocs-site Ready Ready Preview, Comment Jan 19, 2026 8:09am

Request Review

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Copilot AI changed the title [WIP] Add example folder for CLI project testing Add example folder for CLI-created project validation Jan 19, 2026
Copilot AI requested a review from huangyiirene January 19, 2026 08:12
@github-actions
Copy link

🚀 Preview Deployment

This pull request will be automatically deployed to Vercel.

Preview Links

  • 📝 Documentation: Will be available once Vercel deployment completes
  • 🌍 Languages: English (/en/docs) and Chinese (/cn/docs)

Build Status

Check the CI workflow for build status and any errors.


Automated preview information for PR #26

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jan 19, 2026
@huangyiirene huangyiirene marked this pull request as ready for review January 19, 2026 10:45
@huangyiirene huangyiirene merged commit 46ec7f0 into main Jan 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants