From 2874fc75ce45b17fd4457440e55660d7118fbc46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 8 Apr 2017 11:15:28 +0200 Subject: hugolib, output: Add NotAlternative to OutputFormat To make sure CSS and similar does not appear in the AlternativeOutputFormats list. --- output/outputFormat.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'output') 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", -- cgit v1.2.3