diff options
author | Robert van Gent <rvangent@google.com> | 2019-05-31 19:55:48 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-05-31 23:08:12 +0300 |
commit | b0f536fb276f63df0b0b8d92aeda80affb4b6a34 (patch) | |
tree | 616249222d6f07e56c7c71af6bce793d5a5939f0 /docs | |
parent | 1384d77a04d7027d719993c6f54f892b5e7974db (diff) |
Drop dashes in http header matcher attributes; other changes from code review
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/en/hosting-and-deployment/hugo-deploy.md | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/docs/content/en/hosting-and-deployment/hugo-deploy.md b/docs/content/en/hosting-and-deployment/hugo-deploy.md index 07234164d..fa578a604 100644 --- a/docs/content/en/hosting-and-deployment/hugo-deploy.md +++ b/docs/content/en/hosting-and-deployment/hugo-deploy.md @@ -58,12 +58,12 @@ a detailed example: # By default, files are uploaded in an arbitrary order. # Files that match the regular expressions in the "Order" list # will be uploaded first, in the listed order. -Order = [".jpg$", ".gif$"] +order = [".jpg$", ".gif$"] [[deployment.targets]] # An arbitrary name for this target. -Name = "mydeployment" +name = "mydeployment" # The Go Cloud Development Kit URL to deploy to. Examples: # URL = "gs://<Bucket Name>" # For GCS; see https://gocloud.dev/howto/blob/open-bucket/#gcs. # URL = "s3://<Bucket Name>?region=<AWS region>" # For S3; see https://gocloud.dev/howto/blob/open-bucket/#s3. @@ -71,7 +71,7 @@ Name = "mydeployment" # You can use a "prefix=" query parameter to target a subfolder of the bucket: # URL = "gs://<Bucket Name>?prefix=a/subfolder/" # If you are using a CloudFront CDN, deploy will invalidate the cache as needed. -CloudFrontDistributionID = <ID> +cloudFrontDistributionID = <ID> # ... add more [[deployment.targets]] sections ... @@ -82,17 +82,17 @@ CloudFrontDistributionID = <ID> [[deployment.matchers]] # Cache static assets for 20 years. -Pattern = "^.+\\.(js|css|svg|ttf)$" -Cache-Control = "max-age=630720000, no-transform, public" +pattern = "^.+\\.(js|css|svg|ttf)$" +cacheControl = "max-age=630720000, no-transform, public" gzip = true [[deployment.matchers]] -Pattern = "^.+\\.(png|jpg)$" -Cache-Control = "max-age=630720000, no-transform, public" +pattern = "^.+\\.(png|jpg)$" +cacheControl = "max-age=630720000, no-transform, public" gzip = false [[deployment.matchers]] -Pattern = "^.+\\.(html|xml|json)$" +pattern = "^.+\\.(html|xml|json)$" gzip = true ``` @@ -100,11 +100,12 @@ gzip = true To deploy to a target: ``` -hugo deploy --target=<target> +hugo deploy --target=<target name> ``` -Hugo will identify any local changes that need to be uploaded, and ask for -confirmation before doing anything. +Hugo will identify and apply any local changes that need to be reflected to the +remote target. You can use `--dryRun` to see the changes without applying them, +or `--confirm` to be prompted before making changes. See `hugo help deploy` for more command-line options. |