diff options
author | Bjørn Erik Pedersen <[email protected]> | 2018-08-28 14:18:12 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-08-28 17:00:53 +0200 |
commit | ebb56e8bdbfaf4f955326017e40b2805850871e9 (patch) | |
tree | 64935a5bfaeb5b2cc8e5c600ad2403d32d3de65c /hugolib/site_output_test.go | |
parent | 6b9934a26615ea614b1774770532cae9762a58d3 (diff) | |
download | hugo-ebb56e8bdbfaf4f955326017e40b2805850871e9.tar.gz hugo-ebb56e8bdbfaf4f955326017e40b2805850871e9.zip |
Improve minifier MIME type resolution
This commit also removes the deprecated `Suffix` from MediaType. Now use `Suffixes` and put the MIME type suffix in the type, e.g. `application/svg+xml`.
Fixes #5093
Diffstat (limited to 'hugolib/site_output_test.go')
-rw-r--r-- | hugolib/site_output_test.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/hugolib/site_output_test.go b/hugolib/site_output_test.go index 0677dfbfb..e9a7e113e 100644 --- a/hugolib/site_output_test.go +++ b/hugolib/site_output_test.go @@ -276,14 +276,12 @@ disableKinds = ["page", "section", "taxonomy", "taxonomyTerm", "sitemap", "robot [mediaTypes] [mediaTypes."text/nodot"] -suffix = "" delimiter = "" [mediaTypes."text/defaultdelim"] -suffix = "defd" +suffixes = ["defd"] [mediaTypes."text/nosuffix"] -suffix = "" [mediaTypes."text/customdelim"] -suffix = "del" +suffixes = ["del"] delimiter = "_" [outputs] @@ -321,7 +319,7 @@ baseName = "customdelimbase" th.assertFileContent("public/_redirects", "a dotless") th.assertFileContent("public/defaultdelimbase.defd", "default delimim") // This looks weird, but the user has chosen this definition. - th.assertFileContent("public/nosuffixbase.", "no suffix") + th.assertFileContent("public/nosuffixbase", "no suffix") th.assertFileContent("public/customdelimbase_del", "custom delim") s := h.Sites[0] @@ -332,7 +330,7 @@ baseName = "customdelimbase" require.Equal(t, "/blog/_redirects", outputs.Get("DOTLESS").RelPermalink()) require.Equal(t, "/blog/defaultdelimbase.defd", outputs.Get("DEF").RelPermalink()) - require.Equal(t, "/blog/nosuffixbase.", outputs.Get("NOS").RelPermalink()) + require.Equal(t, "/blog/nosuffixbase", outputs.Get("NOS").RelPermalink()) require.Equal(t, "/blog/customdelimbase_del", outputs.Get("CUS").RelPermalink()) } |