Static HTML
import { Details, Render } from "~/components";
Cloudflare supports deploying any static HTML website to Cloudflare Pages. If you manage your website without using a framework or static site generator, or if your framework is not listed in Framework guides, you can still deploy it using this guide.
Deploy with Cloudflare Pages
| Configuration option | Value |
|---|---|
| Production branch | main |
| Build command (optional) | exit 0 |
| Build output directory | <YOUR_BUILD_DIR> |
Unlike many of the framework guides, the build command and build output directory for your site are going to be completely custom. If you are not using a preset and do not need to build your site, use exit 0 as your Build command. Cloudflare recommends using exit 0 as your Build command to access features such as Pages Functions. The Build output directory is where your application's content lives.
After configuring your site, you can begin your first deploy. Your custom build command (if provided) will run, and Pages will deploy your static site.
:::note
For the complete guide to deploying your first site to Cloudflare Pages, refer to the Get started guide.
:::
After you have deployed your site, you will receive a unique subdomain for your project on *.pages.dev. Cloudflare Pages will automatically rebuild your project and deploy it. You will also get access to preview deployments on new pull requests, so you can preview how changes look to your site before deploying them to production.
If you are getting 404 errors when visiting your *.pages.dev domain, make sure your website has a top-level file for index.html. This index.html is what Pages will serve on your apex with no page specified.
<Render file="framework-guides/learn-more" product="pages" params={{ one: " " }} />
谢谢你的反馈!