导航菜单

Pages (Static Hosting)

Outline

1. What Pages Is

  • What Cloudflare Pages provides
  • Static hosting service
  • Advantages and differentiators

2. Create a Pages Project

  • Deploy from Git

    • Connect GitHub/GitLab/Bitbucket
    • Choose repo and branch
    • Configure build settings
  • Direct upload

    • Upload static files
    • Quick deploy

3. Build Configuration

  • Build command

    • Set the command
    • Configure output directory
  • Environment variables

    • Add env vars
    • Per-environment settings
  • Node.js version

    • Choose Node.js runtime
    • Compatibility notes

4. Automated Deploys

  • Git integration

    • Auto-triggered deploys
    • Branch deploy strategy
    • Preview deployments
  • Deploy hooks

    • Webhooks to trigger deploys
    • Custom pipelines

5. Custom Domains

  • Add a custom domain
  • SSL certificate setup
  • Domain verification

6. Pages Features

  • Preview deployments

    • Per-PR previews
    • Preview URLs
  • Redirect rules

    • Configure redirects
    • Rule formats
  • Headers

    • Custom response headers
    • Security headers
  • Functions

    • Pages Functions
    • Serverless functions

7. Performance Optimizations

  • Auto optimizations
  • Image optimizations
  • Cache strategies

8. Integrations

  • Workers
  • R2
  • Analytics

9. FAQs

  • Build failures
  • Slow deployments
  • Custom domain setup issues
  • Environment variables not applied

10. Summary

  • When to use Pages
  • Best practices

搜索