mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
hugolib, output: Fix RSSLink vs output formats
And remove the now superflous setPageURLs method.
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
var (
|
||||
// An ordered list of built-in output formats
|
||||
// See https://www.ampproject.org/learn/overview/
|
||||
// TODO(bep) output rename to AMPFormat etc.
|
||||
AMPType = Format{
|
||||
Name: "AMP",
|
||||
MediaType: media.HTMLType,
|
||||
@@ -84,6 +85,17 @@ var builtInTypes = map[string]Format{
|
||||
|
||||
type Formats []Format
|
||||
|
||||
func (formats Formats) GetByName(name string) (f Format, found bool) {
|
||||
for _, ff := range formats {
|
||||
if name == ff.Name {
|
||||
f = ff
|
||||
found = true
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Format represents an output represenation, usually to a file on disk.
|
||||
type Format struct {
|
||||
// The Name is used as an identifier. Internal output formats (i.e. HTML and RSS)
|
||||
|
Reference in New Issue
Block a user