summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorJanus <janus@insignificancegalore.net>2018-10-16 23:51:48 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-10-16 23:51:48 +0200
commit1f42e47e475c0cd684426dd230de411d4c385a3c (patch)
tree9a16adcf24b856f38498abe63e9664e64153f8e2 /hugolib
parent35fbfb19a173b01bc881f2bbc5d104136633a7ec (diff)
Allow date and slug from filename for leaf bundles
Fixes #4558
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/page.go2
-rw-r--r--hugolib/pagemeta/page_frontmatter.go3
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.