diff options
author | Janus <janus@insignificancegalore.net> | 2018-10-16 23:51:48 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-10-16 23:51:48 +0200 |
commit | 1f42e47e475c0cd684426dd230de411d4c385a3c (patch) | |
tree | 9a16adcf24b856f38498abe63e9664e64153f8e2 /hugolib | |
parent | 35fbfb19a173b01bc881f2bbc5d104136633a7ec (diff) |
Allow date and slug from filename for leaf bundles
Fixes #4558
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/page.go | 2 | ||||
-rw-r--r-- | hugolib/pagemeta/page_frontmatter.go | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/hugolib/page.go b/hugolib/page.go index 8a2864e7f..0359769e3 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -1326,7 +1326,7 @@ func (p *Page) update(frontmatter map[string]interface{}) error { Params: p.params, Dates: &p.PageDates, PageURLs: &p.URLPath, - BaseFilename: p.BaseFileName(), + BaseFilename: p.ContentBaseName(), ModTime: mtime, GitAuthorDate: gitAuthorDate, } diff --git a/hugolib/pagemeta/page_frontmatter.go b/hugolib/pagemeta/page_frontmatter.go index 88f6f3a11..f75613e80 100644 --- a/hugolib/pagemeta/page_frontmatter.go +++ b/hugolib/pagemeta/page_frontmatter.go @@ -47,7 +47,8 @@ type FrontMatterDescriptor struct { // This the Page's front matter. Frontmatter map[string]interface{} - // This is the Page's base filename, e.g. page.md. + // This is the Page's base filename (BaseFilename), e.g. page.md., or + // if page is a leaf bundle, the bundle folder name (ContentBaseName). BaseFilename string // The content file's mod time. |