Misc depreation updates

* Deprecate .Page.Path when backed by a file
* site.Permalinks
* --ignoreVendor (use --ignoreVendorPaths)

Closes #9348
Closes #9349
This commit is contained in:
Bjørn Erik Pedersen
2022-01-04 13:07:10 +01:00
parent 56ab83a597
commit 2b6063c3e3
19 changed files with 52 additions and 58 deletions

View File

@@ -403,7 +403,7 @@ func (m *pageMap) assembleResources(s string, p *pageState, parentBucket *pagesM
if err != nil {
return true
}
rp.m.resourcePath = filepath.ToSlash(strings.TrimPrefix(rp.Path(), p.File().Dir()))
rp.m.resourcePath = filepath.ToSlash(strings.TrimPrefix(rp.File().Path(), p.File().Dir()))
r = rp
case files.ContentClassFile:
@@ -468,7 +468,6 @@ func (m *pageMap) assembleSections() error {
kind := page.KindSection
if s == "/" {
kind = page.KindHome
}
@@ -580,7 +579,7 @@ func (m *pageMap) attachPageToViews(s string, b *contentNode) {
w := getParamToLower(b.p, viewName.plural+"_weight")
weight, err := cast.ToIntE(w)
if err != nil {
m.s.Log.Errorf("Unable to convert taxonomy weight %#v to int for %q", w, b.p.Path())
m.s.Log.Errorf("Unable to convert taxonomy weight %#v to int for %q", w, b.p.Pathc())
// weight will equal zero, so let the flow continue
}