Thêm nút "Mở trong Firebase Studio"
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Với Firebase Studio, bạn có thể đơn giản hoá các bước để người mới làm quen với cơ sở mã của bạn thiết lập môi trường phát triển và làm việc hiệu quả.
Ví dụ:
Nếu làm việc trong một nhóm với những người đóng góp khác, bạn có thể tuỳ chỉnh chính xác môi trường cho dự án của mình, sau đó cam kết tệp .idx/dev.nix
với kho lưu trữ Git của dự án. Nhờ đó, khi một đồng đội nhập kho lưu trữ Git của bạn trong Firebase Studio, không gian làm việc mới của họ sẽ có cấu hình giống hệt như của bạn, bao gồm cả các gói hệ thống, tiện ích IDE, tập lệnh khởi động, v.v.
Nếu đang tạo một khung hoặc thư viện để người khác sử dụng, bạn có thể đưa tệp .idx/dev.nix
vào kho lưu trữ mã mẫu để khi người dùng nhập các mẫu của bạn vào Firebase Studio, họ có thể bỏ qua bước thiết lập môi trường và chuyển thẳng đến bước dùng thử khung của bạn. Bạn thậm chí có thể tạo mẫu tuỳ chỉnh của riêng mình làm điểm bắt đầu có thể tuỳ chỉnh theo ý muốn cho người dùng.
Sau khi hài lòng với các chế độ tuỳ chỉnh môi trường, bạn có thể giúp người khác dễ dàng nhập dự án của bạn vào Firebase Studio hơn nữa bằng cách thêm nút "Mở trong Firebase Studio" vào tài liệu của bạn, chẳng hạn như tệp README.md
của dự án.
Các điểm truy cập "Mở trong Firebase Studio" thường gặp
Có một số mẫu URL cho nút "Mở trong Firebase Studio":
Để liên kết đến quy trình nhập kho lưu trữ Git, được điền sẵn URL kho lưu trữ Git của bạn, hãy sử dụng mẫu URL này:
https://studio.firebase.google.com/import?url=https://github.com/my-org/my-repo
Hiện tại, chúng tôi chỉ hỗ trợ các kho lưu trữ trên GitHub (cả riêng tư và công khai).
Để liên kết đến một mẫu không gian làm việc được xác định trước, hãy tìm mẫu mà bạn đang tìm kiếm trong trang Mẫu trong Firebase Studio rồi sao chép URL của mẫu đó. URL này phải tuân theo mẫu URL sau:
https://studio.firebase.google.com/new/gemini
Để liên kết đến một mẫu tuỳ chỉnh, được điền sẵn URL GitHub của mẫu, hãy sử dụng mẫu URL này:
https://studio.firebase.google.com/new?template=https://github.com/my-org/my-template
Để mở App Prototyping agent bằng một câu lệnh được điền sẵn, hãy sử dụng mẫu URL này:
https://studio.firebase.google.com/?prototypePrompt=Create an app that transforms sketches into a high-quality photograph with Gemini
Thêm nút "Mở trong Firebase Studio"
Cài đặt Open in Firebase Studio
SDK (Mở trong SDK Firebase Studio) hoặc dùng công cụ này để tạo HTML cho nút Firebase Studio:
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["With Firebase Studio, you can simplify the steps for someone new to\nyour codebase to set up their development environment and get productive.\n\nFor example:\n\n- If you're **working on a team with other contributors** , you can\n [customize your environment](/docs/studio/customize-workspace)\n precisely for your project and then commit your `.idx/dev.nix` file to\n your project's Git repository. That way, when a teammate imports your\n Git repository in Firebase Studio, their new workspace will have\n the exact same configuration as yours, complete with the same system\n packages, IDE extensions, starter scripts, and more.\n\n- If you're **building a framework or library** for others to use, you\n can include a `.idx/dev.nix` file in your sample code repositories, so\n that when a user imports your samples into Firebase Studio, they\n can skip the environment setup and jump straight into trying out your\n framework. You can even [build your own, custom\n template](/docs/studio/custom-templates) as an opinionated,\n customizable starting point for your users.\n\nAfter you're happy with your environment customizations, you can make it\neven easier for others to import your project into Firebase Studio by\nadding an \"Open in Firebase Studio\" button to your documentation, such\nas your project's `README.md` file.\n\nCommon \"Open in Firebase Studio\" entry points\n\nThere are several URL patterns available for an \"Open in\nFirebase Studio\" button:\n\n- To link to the **import a Git repository** flow, prefilled with your Git\n repository URL, use this URL pattern:\n\n https://studio.firebase.google.com/import?url=https://github.com/my-org/my-repo\n\n At this time, only GitHub repositories are supported (both private and\n public).\n- To link to a **predefined workspace template** , find the template\n you're looking for in the\n [Templates](https://studio.firebase.google.com/templates) page in\n Firebase Studio, and copy its URL, which should follow this URL pattern:\n\n https://studio.firebase.google.com/new/gemini\n\n- To link to a **custom template**, prefilled with your template's GitHub URL,\n use this URL pattern:\n\n https://studio.firebase.google.com/new?template=https://github.com/my-org/my-template\n\n- To open the App Prototyping agent with a pre-filled prompt, use this URL\n pattern:\n\n https://studio.firebase.google.com/?prototypePrompt=Create an app that transforms sketches into a high-quality photograph with Gemini\n\nAdd an \"Open in Firebase Studio\" button\n\nInstall the [Open in Firebase Studio\nSDK](https://www.npmjs.com/package/@firebase-studio/open-sdk) or\nuse this tool to generate the HTML for a Firebase Studio button:"]]