Co-Pilot / 辅助式
更新于 a month ago

nuxt-studio

Nnuxt-content
0.5k
nuxt-content/nuxt-studio
82
Agent 评分

💡 摘要

Nuxt Studio 是一个用于 Nuxt 应用程序的开源模块,支持实时内容编辑。

🎯 适合人群

使用 Nuxt.js 的网页开发者寻找实时编辑工具的内容管理者协作处理网页内容的团队管理客户网站的自由职业者开源贡献者

🤖 AI 吐槽:看起来很能打,但别让配置把人劝退。

安全分析中风险

风险:Medium。建议检查:是否执行 shell/命令行指令;是否发起外网请求(SSRF/数据外发);API Key/Token 的获取、存储与泄露风险;文件读写范围与路径穿越风险。以最小权限运行,并在生产环境启用前审计代码与依赖。

Nuxt Studio

npm version npm downloads License

Visual edition in production for your Nuxt Content website.

Originally offered as a standalone premium platform, Studio has evolved into a free, open-source, and self-hostable Nuxt module. Enable your entire team to edit website content right in production.

https://github.com/user-attachments/assets/39bf4250-e72b-45aa-bf6d-9441a38cb2d5

Current Features

  • 💻 Monaco Code Editor - Code editor for enhanced Markdown with MDC syntax, YAML, and JSON
  • TipTap Visual Editor - Markdown editor with MDC component support (default mode)
  • 📝 Form-based Editor - Edit YAML/JSON files and frontmatter with auto-generated forms based on collection schemas
  • 🎨 Vue Component Props Editor - Visual interface for editing Vue component props directly in the editor
  • 🔄 Real-time Preview - See your changes instantly on your production website
  • 🔐 Multi-provider Authentication - Secure OAuth-based login with GitHub, GitLab, and Google
  • 🔑 Custom Authentication - Utilities for implementing your own auth flow (password, SSO, LDAP)
  • 📝 File Management - Create, edit, delete, and rename content files (content/ directory)
  • 🖼️ Media Management - Centralized media library with support for JPEG, PNG, GIF, WebP, AVIF, SVG, and more
  • 🌳 Git Integration - Commit changes directly from your production website and just wait your CI/CD pipeline to deploy your changes
  • 🚀 Development Mode - Directly edit your content files and media files in your local filesystem using the module interface
  • 🌍 22 Languages - Full i18n support (AR, BG, CS, DE, EN, ES, FA, FI, FR, ID, IT, JA, KO, NB-NO, NL, NN-NO, PL, PT-BR, RU, UA, ZH, ZH-TW)

Future Features:

  • 📂 Collections view - View and manage your content collections in a unified interface
  • 🖼️ Media optimization - Optimize your media files in the editor
  • 🤖 AI Content Assistant — Receive smart, AI-powered suggestions to enhance your content creation flow
  • 💡 Community-driven Features — Have an idea? Share your suggestions to shape the future of Nuxt Studio

Resources

Quick Setup

1. Install

Install the module in your Nuxt application:

npx nuxi module add nuxt-studio

2. Dev Mode

🚀 That's all you need to enable Studio locally!

Run your Nuxt app and you will see a floating button on bottom left for editing your content. Any file changes will be synchronized in real time with the file system.

Note: The publish system is only available in production mode. Use your classical workflow (IDE, CLI, GitHub Desktop...) to publish your changes locally.

3. Configure Production

Add it to your nuxt.config.ts and configure your repository:

export default defineNuxtConfig({ modules: [ '@nuxt/content', 'nuxt-studio' ], studio: { // Studio admin route (default: '/_studio') route: '/_studio', // Git repository configuration (owner and repo are required) repository: { provider: 'github', // 'github' or 'gitlab' owner: 'your-username', // your GitHub/GitLab username or organization repo: 'your-repo', // your repository name branch: 'main', // the branch to commit to (default: main) } } })

4. Production Mode

To enable publishing directly from your production website, you need to configure:

Git Provider

Configure where your content is stored (GitHub or GitLab repository). See the repository configuration above.

📖 Git Providers Documentation

Auth Provider

Configure how users authenticate to access Studio. Choose from GitHub, GitLab, Google OAuth, or custom authentication.

# Example with GitHub OAuth STUDIO_GITHUB_CLIENT_ID=<your_client_id> STUDIO_GITHUB_CLIENT_SECRET=<your_client_secret>

📖 Auth Providers Documentation

Deployment

Nuxt Studio requires server-side routes for authentication. Your site must be deployed on a platform that supports SSR using nuxt build.

Open Studio

Once deployed, navigate to your configured route (default: /_studio) and authenticate to start editing.

Configuration Options

export default defineNuxtConfig({ studio: { // Studio admin login route route: '/_studio', // default // Git repository configuration repository: { provider: 'github', // 'github' or 'gitlab' (default: 'github') owner: 'your-username', // your GitHub/GitLab owner (required) repo: 'your-repo', // your repository name (required) branch: 'main', // branch to commit to (default: 'main') rootDir: '', // subdirectory for monorepos (default: '') private: true, // request access to private repos (default: true) }, } })

Contributing

You can start contributing by cloning the repository and using the playground in dev mode (set dev option to true).

If you want to contribute with production mode you must create a local GitHub OAuth App (pointing to http://localhost:3000 as callback URL).

Development Setup

# Install dependencies pnpm install # Generate type stubs pnpm dev:prepare # Build the app and service worker pnpm prepack # Terminal 1: Start the playground pnpm dev # Terminal 2: Start the app dev server pnpm dev:app # Login at http://localhost:3000/admin

Project Structure

studio/ ├── src/ │ ├── app/ # Studio editor Vue app │ └── module/ # Nuxt module ├── playground/ # Development playground │ ├── docus/ # Docus example │ └── minimal/ # Minimal example

Testing

You can run a global command to test all needed check at once.

# Global verify running all needed commands pnpm verify

Or run them one by one.

# Run tests pnpm test # Run type checking pnpm typecheck # Run linter pnpm lint

Roadmap

✅ Phase 1 (Completed)

  • [x] Monaco code editor
  • [x] TipTap visual editor with MDC support (default mode)
  • [x] Editor mode switching (code ↔ visual/form)
  • [x] Form-based editor for YAML/JSON and frontmatter (schema-based)
  • [x] File operations (create, edit, delete, rename)
  • [x] Media management with visual picker
  • [x] Enhanced component slot editing
  • [x] GitHub authentication
  • [x] GitLab provider support
  • [x] Google OAuth authentication
  • [x] Development mode
  • [x] Git integration
  • [x] Real-time preview
  • [x] Internationalization (22 languages)
  • [x] Custom authentication utilities
  • [x] Vue Component props editor (visual interface)
  • [x] Span-style text formatting with toolbar button
  • [x] Binding extension for component prop editing

🔮 Future

  • [ ] Advanced conflict resolution
  • [ ] Pull request generation (from a branch to the main one)
  • [ ] AI-powered content suggestions
  • [ ] Media optimization

Links

License

Published under the MIT license.

五维分析
清晰度9/10
创新性7/10
实用性9/10
完整性8/10
可维护性8/10
优缺点分析

优点

  • 实时编辑功能
  • 支持多种身份验证方式
  • 与 Git 集成以进行版本控制
  • 多语言支持

缺点

  • 生产环境需要服务器端渲染
  • 初学者设置可能较复杂
  • 仅限于 Nuxt.js 应用程序
  • 身份验证可能存在安全风险

相关技能

pytorch

S
toolCode Lib / 代码库
92/ 100

“它是深度学习的瑞士军刀,但祝你好运能从47种安装方法里找到那个不会搞崩你系统的那一个。”

agno

S
toolCode Lib / 代码库
90/ 100

“它承诺成为智能体领域的Kubernetes,但得看开发者有没有耐心学习又一个编排层。”

nuxt-skills

S
toolCo-Pilot / 辅助式
90/ 100

“这本质上是一份组织良好的小抄,能把你的 AI 助手变成一只 Nuxt 框架的复读机。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 nuxt-content.