Skip to main content

Deploying to Aerobatic

特技飞行是一个专门的静态站点主机. 您可以通过以下步骤轻松地将Gatsby站点部署到Aerobatic:

  1. 安装特技CLI:

npm install aerobatic-cli -g

  1. 在您的Gatsby项目的根目录下创建一个新的特技飞行地点:

aero create --name <your-site-name>

  1. 部署Gatsby构建输出:

aero deploy --directory public

您的网站将在几秒钟内通过https://<your-site-name>.aerobaticapp.com的CDN就绪.

您可以在aerobatic.yml文件中配置一些其他HTTP标头优化:

aerobatic.yml
deploy:
# Note with below setting it is not necessary to pass --directory to aero deploy command
directory: public
# Turn off the Aerobatic asset fingerprinting since Gatsby already does this
optimizer:
fingerprintAssets: false
plugins:
# Force aggressive 1yr max-age header for all .js and .js.map requests
- name: http-headers
path: ["/*.js", "/*.js.map"]
options:
"Cache-Control": "public, max-age=31536000"
- name: webpage

Other resources


Edit this page on GitHub
Docs
Tutorials
Plugins
Blog
Showcase

by  ICOPY.SITE