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

@@ -59,7 +59,7 @@ func (m PageMatcher) Matches(p Page) bool {
if m.Path != "" {
g, err := glob.GetGlob(m.Path)
// TODO(bep) Path() vs filepath vs leading slash.
p := strings.ToLower(filepath.ToSlash(p.Path()))
p := strings.ToLower(filepath.ToSlash(p.Pathc()))
if !(strings.HasPrefix(p, "/")) {
p = "/" + p
}
@@ -104,7 +104,6 @@ func DecodeCascade(in interface{}) (map[PageMatcher]maps.Params, error) {
}
return cascade, nil
}
// DecodePageMatcher decodes m into v.