summaryrefslogtreecommitdiffstats
path: root/output/outputFormat.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-24 11:25:25 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-27 15:43:56 +0200
commit87188496fbb68c39567ec3ee3a55a9305a13e48b (patch)
treeb70e4c3ce41c4d97fe70ce8cb06c4ee0e819084c /output/outputFormat.go
parent0c4701f0effbf651891979b925073f6fc5d26a82 (diff)
hugolib, output: Handle aliases for all HTML formats
Diffstat (limited to 'output/outputFormat.go')
-rw-r--r--output/outputFormat.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/output/outputFormat.go b/output/outputFormat.go
index c50d74f3f..2ef5fb62b 100644
--- a/output/outputFormat.go
+++ b/output/outputFormat.go
@@ -29,6 +29,7 @@ var (
BaseName: "index",
Path: "amp",
Rel: "amphtml",
+ IsHTML: true,
}
CalendarType = Format{
@@ -52,6 +53,7 @@ var (
MediaType: media.HTMLType,
BaseName: "index",
Rel: "canonical",
+ IsHTML: true,
}
JSONType = Format{
@@ -113,6 +115,10 @@ type Format struct {
// as template parser.
IsPlainText bool
+ // 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.
+ IsHTML bool
+
// Enable to ignore the global uglyURLs setting.
NoUgly bool
}