aboutsummaryrefslogtreecommitdiffhomepage
path: root/output
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2017-03-23 17:31:05 +0100
committerBjørn Erik Pedersen <[email protected]>2017-03-27 15:43:56 +0200
commit8bcc08e3b0ddd5762101bb2f061e0be04ecd8d57 (patch)
treed2550507b4dbb96509e638d1637d297359089edc /output
parentdbb83f925a7cb256b69b158e2caf0d99e3c7c5e6 (diff)
downloadhugo-8bcc08e3b0ddd5762101bb2f061e0be04ecd8d57.tar.gz
hugo-8bcc08e3b0ddd5762101bb2f061e0be04ecd8d57.zip
media, output: Add Calendar type
Diffstat (limited to 'output')
-rw-r--r--output/outputFormat.go9
-rw-r--r--output/outputFormat_test.go6
2 files changed, 15 insertions, 0 deletions
diff --git a/output/outputFormat.go b/output/outputFormat.go
index 3812030d1..efc0cd85f 100644
--- a/output/outputFormat.go
+++ b/output/outputFormat.go
@@ -31,6 +31,15 @@ var (
Rel: "amphtml",
}
+ CalendarType = Format{
+ Name: "Calendar",
+ MediaType: media.CalendarType,
+ IsPlainText: true,
+ Protocol: "webcal://",
+ BaseName: "index",
+ Rel: "alternate",
+ }
+
CSSType = Format{
Name: "CSS",
MediaType: media.CSSType,
diff --git a/output/outputFormat_test.go b/output/outputFormat_test.go
index 21375bf56..efc31a223 100644
--- a/output/outputFormat_test.go
+++ b/output/outputFormat_test.go
@@ -21,6 +21,12 @@ import (
)
func TestDefaultTypes(t *testing.T) {
+ require.Equal(t, "Calendar", CalendarType.Name)
+ require.Equal(t, media.CalendarType, CalendarType.MediaType)
+ require.Equal(t, "webcal://", CalendarType.Protocol)
+ require.Empty(t, CalendarType.Path)
+ require.True(t, CalendarType.IsPlainText)
+
require.Equal(t, "HTML", HTMLType.Name)
require.Equal(t, media.HTMLType, HTMLType.MediaType)
require.Empty(t, HTMLType.Path)