summaryrefslogtreecommitdiffstats
path: root/output
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-04-08 11:15:28 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-04-08 11:21:12 +0200
commit2874fc75ce45b17fd4457440e55660d7118fbc46 (patch)
treee18af3d9a659386c99f4b6562b150fb4d0ae7297 /output
parent9e69a92e85937c6e59839e58937ed1db1e497557 (diff)
hugolib, output: Add NotAlternative to OutputFormat
To make sure CSS and similar does not appear in the AlternativeOutputFormats list.
Diffstat (limited to 'output')
-rw-r--r--output/outputFormat.go17
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",