mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
media: Add JSON tags to Type
See https://github.com/gohugoio/hugoDocs/issues/114
This commit is contained in:
parent
9c1977872c
commit
e321306c68
1 changed files with 4 additions and 4 deletions
|
@ -33,10 +33,10 @@ const (
|
||||||
// If suffix is not provided, the sub type will be used.
|
// If suffix is not provided, the sub type will be used.
|
||||||
// See // https://en.wikipedia.org/wiki/Media_type
|
// See // https://en.wikipedia.org/wiki/Media_type
|
||||||
type Type struct {
|
type Type struct {
|
||||||
MainType string // i.e. text
|
MainType string `json:"mainType"` // i.e. text
|
||||||
SubType string // i.e. html
|
SubType string `json:"subType"` // i.e. html
|
||||||
Suffix string // i.e html
|
Suffix string `json:"suffix"` // i.e html
|
||||||
Delimiter string // defaults to "."
|
Delimiter string `json:"delimiter"` // defaults to "."
|
||||||
}
|
}
|
||||||
|
|
||||||
// FromTypeString creates a new Type given a type sring on the form MainType/SubType and
|
// FromTypeString creates a new Type given a type sring on the form MainType/SubType and
|
||||||
|
|
Loading…
Reference in a new issue