diff options
author | Bjørn Erik Pedersen <[email protected]> | 2017-03-23 20:05:10 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2017-03-27 15:43:56 +0200 |
commit | d851d6b98fefbe7de91c8c58b883cca4da17eea9 (patch) | |
tree | 5171cf499aef5d69ef00ef3b4bcdca777363060b /output | |
parent | 8bcc08e3b0ddd5762101bb2f061e0be04ecd8d57 (diff) | |
download | hugo-d851d6b98fefbe7de91c8c58b883cca4da17eea9.tar.gz hugo-d851d6b98fefbe7de91c8c58b883cca4da17eea9.zip |
Add custom protocol support in Permalink
Diffstat (limited to 'output')
-rw-r--r-- | output/outputFormat.go | 11 | ||||
-rw-r--r-- | output/outputFormat_test.go | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/output/outputFormat.go b/output/outputFormat.go index efc0cd85f..c50d74f3f 100644 --- a/output/outputFormat.go +++ b/output/outputFormat.go @@ -72,11 +72,12 @@ var ( ) var builtInTypes = map[string]Format{ - strings.ToLower(AMPType.Name): AMPType, - strings.ToLower(CSSType.Name): CSSType, - strings.ToLower(HTMLType.Name): HTMLType, - strings.ToLower(JSONType.Name): JSONType, - strings.ToLower(RSSType.Name): RSSType, + strings.ToLower(AMPType.Name): AMPType, + strings.ToLower(CalendarType.Name): CalendarType, + strings.ToLower(CSSType.Name): CSSType, + strings.ToLower(HTMLType.Name): HTMLType, + strings.ToLower(JSONType.Name): JSONType, + strings.ToLower(RSSType.Name): RSSType, } type Formats []Format diff --git a/output/outputFormat_test.go b/output/outputFormat_test.go index efc31a223..a76c50aee 100644 --- a/output/outputFormat_test.go +++ b/output/outputFormat_test.go @@ -30,6 +30,7 @@ func TestDefaultTypes(t *testing.T) { require.Equal(t, "HTML", HTMLType.Name) require.Equal(t, media.HTMLType, HTMLType.MediaType) require.Empty(t, HTMLType.Path) + require.Empty(t, HTMLType.Protocol) // Will inherit the BaseURL protocol. require.False(t, HTMLType.IsPlainText) require.Equal(t, "RSS", RSSType.Name) |