mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
Add path, kind and lang to content front matter
Note that none of these can be set via cascade (you will get an error) Fixes #11544
This commit is contained in:
@@ -187,7 +187,7 @@ func (m *pageMap) AddFi(fi hugofs.FileMetaInfo) error {
|
||||
if pi.IsContent() {
|
||||
// Create the page now as we need it at assemembly time.
|
||||
// The other resources are created if needed.
|
||||
pageResource, err := m.s.h.newPage(
|
||||
pageResource, pi, err := m.s.h.newPage(
|
||||
&pageMeta{
|
||||
f: source.NewFileInfo(fim),
|
||||
pathInfo: pi,
|
||||
@@ -197,6 +197,8 @@ func (m *pageMap) AddFi(fi hugofs.FileMetaInfo) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
key = pi.Base()
|
||||
|
||||
rs = &resourceSource{r: pageResource}
|
||||
} else {
|
||||
rs = &resourceSource{path: pi, opener: r, fi: fim}
|
||||
@@ -226,7 +228,7 @@ func (m *pageMap) AddFi(fi hugofs.FileMetaInfo) error {
|
||||
},
|
||||
))
|
||||
// A content file.
|
||||
p, err := m.s.h.newPage(
|
||||
p, pi, err := m.s.h.newPage(
|
||||
&pageMeta{
|
||||
f: source.NewFileInfo(fi),
|
||||
pathInfo: pi,
|
||||
|
Reference in New Issue
Block a user