mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
media: Rename application/javascript, application/typescript to text/javascript etc.
The former is deprecated. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types See https://discourse.gohugo.io/t/mime-type-for-javascript-is-now-text-javascript/40813
This commit is contained in:
@@ -230,8 +230,8 @@ var (
|
||||
SASSType = newMediaType("text", "x-sass", []string{"sass"})
|
||||
CSVType = newMediaType("text", "csv", []string{"csv"})
|
||||
HTMLType = newMediaType("text", "html", []string{"html"})
|
||||
JavascriptType = newMediaType("application", "javascript", []string{"js", "jsm", "mjs"})
|
||||
TypeScriptType = newMediaType("application", "typescript", []string{"ts"})
|
||||
JavascriptType = newMediaType("text", "javascript", []string{"js", "jsm", "mjs"})
|
||||
TypeScriptType = newMediaType("text", "typescript", []string{"ts"})
|
||||
TSXType = newMediaType("text", "tsx", []string{"tsx"})
|
||||
JSXType = newMediaType("text", "jsx", []string{"jsx"})
|
||||
|
||||
|
@@ -40,8 +40,8 @@ func TestDefaultTypes(t *testing.T) {
|
||||
{SCSSType, "text", "x-scss", "scss", "text/x-scss", "text/x-scss"},
|
||||
{CSVType, "text", "csv", "csv", "text/csv", "text/csv"},
|
||||
{HTMLType, "text", "html", "html", "text/html", "text/html"},
|
||||
{JavascriptType, "application", "javascript", "js", "application/javascript", "application/javascript"},
|
||||
{TypeScriptType, "application", "typescript", "ts", "application/typescript", "application/typescript"},
|
||||
{JavascriptType, "text", "javascript", "js", "text/javascript", "text/javascript"},
|
||||
{TypeScriptType, "text", "typescript", "ts", "text/typescript", "text/typescript"},
|
||||
{TSXType, "text", "tsx", "tsx", "text/tsx", "text/tsx"},
|
||||
{JSXType, "text", "jsx", "jsx", "text/jsx", "text/jsx"},
|
||||
{JSONType, "application", "json", "json", "application/json", "application/json"},
|
||||
|
Reference in New Issue
Block a user