diff options
author | Bjørn Erik Pedersen <[email protected]> | 2017-04-08 11:15:28 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2017-04-08 11:21:12 +0200 |
commit | 2874fc75ce45b17fd4457440e55660d7118fbc46 (patch) | |
tree | e18af3d9a659386c99f4b6562b150fb4d0ae7297 /output/outputFormat.go | |
parent | 9e69a92e85937c6e59839e58937ed1db1e497557 (diff) | |
download | hugo-2874fc75ce45b17fd4457440e55660d7118fbc46.tar.gz hugo-2874fc75ce45b17fd4457440e55660d7118fbc46.zip |
hugolib, output: Add NotAlternative to OutputFormat
To make sure CSS and similar does not appear in the AlternativeOutputFormats list.
Diffstat (limited to 'output/outputFormat.go')
-rw-r--r-- | output/outputFormat.go | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/output/outputFormat.go b/output/outputFormat.go index bd0236278..0845b5d31 100644 --- a/output/outputFormat.go +++ b/output/outputFormat.go @@ -63,6 +63,12 @@ type Format struct { // Enable to ignore the global uglyURLs setting. NoUgly bool + + // Enable if it doesn't make sense to include this format in an alternative + // format listing, CSS being one good example. + // 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. + NotAlternative bool } var ( @@ -88,11 +94,12 @@ var ( } CSSFormat = Format{ - Name: "CSS", - MediaType: media.CSSType, - BaseName: "styles", - IsPlainText: true, - Rel: "stylesheet", + Name: "CSS", + MediaType: media.CSSType, + BaseName: "styles", + IsPlainText: true, + Rel: "stylesheet", + NotAlternative: true, } CSVFormat = Format{ Name: "CSV", |