Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/media
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-04-01 16:12:31 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-04-01 16:12:31 +0300
commitf911b107ef32c1c4369aa252a790e3c933660135 (patch)
treee1ac6996be0cc65eff325fb2ff12723fc73605a3 /media
parent05949c903817b93dd7fd71211260db625180eed6 (diff)
media, output: Add CSV type and format
And make CSS correclty behave as plain text.
Diffstat (limited to 'media')
-rw-r--r--media/mediaType.go1
-rw-r--r--media/mediaType_test.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/media/mediaType.go b/media/mediaType.go
index f6597fdb6..a6ba873eb 100644
--- a/media/mediaType.go
+++ b/media/mediaType.go
@@ -49,6 +49,7 @@ func (m Type) String() string {
var (
CalendarType = Type{"text", "calendar", "ics"}
CSSType = Type{"text", "css", "css"}
+ CSVType = Type{"text", "csv", "csv"}
HTMLType = Type{"text", "html", "html"}
JavascriptType = Type{"application", "javascript", "js"}
JSONType = Type{"application", "json", "json"}
diff --git a/media/mediaType_test.go b/media/mediaType_test.go
index 7636af59c..e918b9393 100644
--- a/media/mediaType_test.go
+++ b/media/mediaType_test.go
@@ -30,6 +30,7 @@ func TestDefaultTypes(t *testing.T) {
}{
{CalendarType, "text", "calendar", "ics", "text/calendar", "text/calendar+ics"},
{CSSType, "text", "css", "css", "text/css", "text/css+css"},
+ {CSVType, "text", "csv", "csv", "text/csv", "text/csv+csv"},
{HTMLType, "text", "html", "html", "text/html", "text/html+html"},
{JavascriptType, "application", "javascript", "js", "application/javascript", "application/javascript+js"},
{JSONType, "application", "json", "json", "application/json", "application/json+json"},