hugolib, output: Add NotAlternative to OutputFormat

To make sure CSS and similar does not appear in the AlternativeOutputFormats list.
This commit is contained in:
Bjørn Erik Pedersen
2017-04-08 11:15:28 +02:00
parent 9e69a92e85
commit 2874fc75ce
3 changed files with 16 additions and 9 deletions

View File

@@ -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",