使用 Craft 的 API 建構Bolt.new
啟用 API 後,您的 Craft 文件即可用於支援您建立的應用程式。之後,您可以存取Bolt.new並使用文件資料建立新的應用程式。
Enabling the API for Documents
First, you have to enable the API in order for Craft to setup an API endpoint for your documents. Then, you use the API endpoint URL to connect to the server from Bolt.

步驟1

步驟2

步驟3

步驟4

步驟5

步驟6
Using the API in a Bolt Prompt
Once the API is enabled for your Craft docs, you can now focus on writing a prompt that Bolt will use to generate your project.
In order for Bolt to see how to use the API and understand the structure of your document, you attach the AI bundle to your prompt. This bundle is a markdown document that contains the current content of your Craft doc as well as the API documentation.

步驟1

步驟2

步驟3
現在您可以新增提示來描述您想要建立的應用程式。以下是一個非常通用的範例,可用於測試:
請建立一個網站,將我的 Craft 文件內容視覺化。附件中包含如何存取這些資料及其結構的說明。

步驟4





