diff options
author | Bjørn Erik Pedersen <[email protected]> | 2021-04-01 19:02:39 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2021-04-01 19:05:33 +0200 |
commit | 7b4ade56dd50d89a91760fc5ef8e2f151874de96 (patch) | |
tree | bc79c3acfbf2c99c4b38d140ee6d9952caaea9bf /output/outputFormat.go | |
parent | 7c7974b711879938eafc08a2ce242d0f00c8e9e6 (diff) | |
download | hugo-7b4ade56dd50d89a91760fc5ef8e2f151874de96.tar.gz hugo-7b4ade56dd50d89a91760fc5ef8e2f151874de96.zip |
output: Only output mediaType once in docshelper JSON
Fixes #8379
Diffstat (limited to 'output/outputFormat.go')
-rw-r--r-- | output/outputFormat.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/output/outputFormat.go b/output/outputFormat.go index 1bd86d2ca..9a081121a 100644 --- a/output/outputFormat.go +++ b/output/outputFormat.go @@ -33,7 +33,7 @@ type Format struct { // can be overridden by providing a new definition for those types. Name string `json:"name"` - MediaType media.Type `json:"mediaType"` + MediaType media.Type `json:"-"` // Must be set to a value when there are two or more conflicting mediatype for the same resource. Path string `json:"path"` @@ -382,7 +382,7 @@ func (f Format) BaseFilename() string { func (f Format) MarshalJSON() ([]byte, error) { type Alias Format return json.Marshal(&struct { - MediaType string + MediaType string `json:"mediaType"` Alias }{ MediaType: f.MediaType.String(), |