mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
output: Add JSON tags to Format
See https://github.com/gohugoio/hugoDocs/issues/114
This commit is contained in:
parent
1c18f3fc49
commit
9c1977872c
1 changed files with 10 additions and 10 deletions
|
@ -30,15 +30,15 @@ import (
|
||||||
type Format struct {
|
type Format struct {
|
||||||
// The Name is used as an identifier. Internal output formats (i.e. HTML and RSS)
|
// The Name is used as an identifier. Internal output formats (i.e. HTML and RSS)
|
||||||
// can be overridden by providing a new definition for those types.
|
// can be overridden by providing a new definition for those types.
|
||||||
Name string
|
Name string `json:"name"`
|
||||||
|
|
||||||
MediaType media.Type
|
MediaType media.Type `json:"mediaType"`
|
||||||
|
|
||||||
// Must be set to a value when there are two or more conflicting mediatype for the same resource.
|
// Must be set to a value when there are two or more conflicting mediatype for the same resource.
|
||||||
Path string
|
Path string `json:"path"`
|
||||||
|
|
||||||
// The base output file name used when not using "ugly URLs", defaults to "index".
|
// The base output file name used when not using "ugly URLs", defaults to "index".
|
||||||
BaseName string
|
BaseName string `json:"baseName"`
|
||||||
|
|
||||||
// The value to use for rel links
|
// The value to use for rel links
|
||||||
//
|
//
|
||||||
|
@ -48,27 +48,27 @@ type Format struct {
|
||||||
// https://www.ampproject.org/docs/guides/deploy/discovery
|
// https://www.ampproject.org/docs/guides/deploy/discovery
|
||||||
// I.e.:
|
// I.e.:
|
||||||
// <link rel="amphtml" href="https://www.example.com/url/to/amp/document.html">
|
// <link rel="amphtml" href="https://www.example.com/url/to/amp/document.html">
|
||||||
Rel string
|
Rel string `json:"rel"`
|
||||||
|
|
||||||
// The protocol to use, i.e. "webcal://". Defaults to the protocol of the baseURL.
|
// The protocol to use, i.e. "webcal://". Defaults to the protocol of the baseURL.
|
||||||
Protocol string
|
Protocol string `json:"protocol"`
|
||||||
|
|
||||||
// IsPlainText decides whether to use text/template or html/template
|
// IsPlainText decides whether to use text/template or html/template
|
||||||
// as template parser.
|
// as template parser.
|
||||||
IsPlainText bool
|
IsPlainText bool `json:"isPlainText"`
|
||||||
|
|
||||||
// IsHTML returns whether this format is int the HTML family. This includes
|
// IsHTML returns whether this format is int the HTML family. This includes
|
||||||
// HTML, AMP etc. This is used to decide when to create alias redirects etc.
|
// HTML, AMP etc. This is used to decide when to create alias redirects etc.
|
||||||
IsHTML bool
|
IsHTML bool `json:"isHTML"`
|
||||||
|
|
||||||
// Enable to ignore the global uglyURLs setting.
|
// Enable to ignore the global uglyURLs setting.
|
||||||
NoUgly bool
|
NoUgly bool `json:"noUgly"`
|
||||||
|
|
||||||
// Enable if it doesn't make sense to include this format in an alternative
|
// Enable if it doesn't make sense to include this format in an alternative
|
||||||
// format listing, CSS being one good example.
|
// format listing, CSS being one good example.
|
||||||
// Note that we use the term "alternative" and not "alternate" here, as it
|
// Note that we use the term "alternative" and not "alternate" here, as it
|
||||||
// does not necessarily replace the other format, it is an alternative representation.
|
// does not necessarily replace the other format, it is an alternative representation.
|
||||||
NotAlternative bool
|
NotAlternative bool `json:"notAlternative"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Reference in a new issue