hugolib, output: Handle aliases for all HTML formats

This commit is contained in:
Bjørn Erik Pedersen
2017-03-24 11:25:25 +01:00
parent 0c4701f0ef
commit 87188496fb
6 changed files with 77 additions and 22 deletions

View File

@@ -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
}