From 21b0c745946f0e10435b3ae7721cb84310e813f1 Mon Sep 17 00:00:00 2001 From: Thomas Jensen Date: Wed, 28 Apr 2021 19:07:01 +0200 Subject: [PATCH] Add info about contentType config Add `contentType`to deploy config example, and a note that matching stops on first match. --- content/en/hosting-and-deployment/hugo-deploy.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content/en/hosting-and-deployment/hugo-deploy.md b/content/en/hosting-and-deployment/hugo-deploy.md index d42ffe6c7..f5f206481 100644 --- a/content/en/hosting-and-deployment/hugo-deploy.md +++ b/content/en/hosting-and-deployment/hugo-deploy.md @@ -108,6 +108,13 @@ pattern = "^.+\\.(png|jpg)$" cacheControl = "max-age=31536000, no-transform, public" gzip = false +# Set custom content type for /sitemap.xml +# Will not hit the next matcher, as searching is stopped on first match +[[deployment.matchers]] +pattern = "^sitemap\\.xml$" +contentType = "application/xml" +gzip = true + [[deployment.matchers]] pattern = "^.+\\.(html|xml|json)$" gzip = true