mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
@@ -70,14 +70,12 @@ type FrontMatterDescriptor struct {
|
||||
PageURLs *URLPath
|
||||
}
|
||||
|
||||
var (
|
||||
dateFieldAliases = map[string][]string{
|
||||
fmDate: {},
|
||||
fmLastmod: {"modified"},
|
||||
fmPubDate: {"pubdate", "published"},
|
||||
fmExpiryDate: {"unpublishdate"},
|
||||
}
|
||||
)
|
||||
var dateFieldAliases = map[string][]string{
|
||||
fmDate: {},
|
||||
fmLastmod: {"modified"},
|
||||
fmPubDate: {"pubdate", "published"},
|
||||
fmExpiryDate: {"unpublishdate"},
|
||||
}
|
||||
|
||||
// HandleDates updates all the dates given the current configuration and the
|
||||
// supplied front matter params. Note that this requires all lower-case keys
|
||||
@@ -263,7 +261,6 @@ func toLowerSlice(in interface{}) []string {
|
||||
// NewFrontmatterHandler creates a new FrontMatterHandler with the given logger and configuration.
|
||||
// If no logger is provided, one will be created.
|
||||
func NewFrontmatterHandler(logger loggers.Logger, cfg config.Provider) (FrontMatterHandler, error) {
|
||||
|
||||
if logger == nil {
|
||||
logger = loggers.NewErrorLogger()
|
||||
}
|
||||
@@ -359,7 +356,6 @@ func (f FrontMatterHandler) createDateHandler(identifiers []string, setter func(
|
||||
}
|
||||
|
||||
return f.newChainedFrontMatterFieldHandler(handlers...), nil
|
||||
|
||||
}
|
||||
|
||||
type frontmatterFieldHandlers int
|
||||
|
Reference in New Issue
Block a user