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

@@ -800,7 +800,6 @@ func (s *sitesBuilder) NpmInstall() hexec.Runner {
command, err := ex.New("npm", "install")
s.Assert(err, qt.IsNil)
return command
}
func newTestHelper(cfg config.Provider, fs *hugofs.Fs, t testing.TB) testHelper {
@@ -998,7 +997,7 @@ func content(c resource.ContentProvider) string {
func pagesToString(pages ...page.Page) string {
var paths []string
for _, p := range pages {
paths = append(paths, p.Path())
paths = append(paths, p.Pathc())
}
sort.Strings(paths)
return strings.Join(paths, "|")
@@ -1020,7 +1019,7 @@ func dumpPages(pages ...page.Page) {
fmt.Println("---------")
for _, p := range pages {
fmt.Printf("Kind: %s Title: %-10s RelPermalink: %-10s Path: %-10s sections: %s Lang: %s\n",
p.Kind(), p.Title(), p.RelPermalink(), p.Path(), p.SectionsPath(), p.Lang())
p.Kind(), p.Title(), p.RelPermalink(), p.Pathc(), p.SectionsPath(), p.Lang())
}
}
@@ -1028,7 +1027,7 @@ func dumpSPages(pages ...*pageState) {
for i, p := range pages {
fmt.Printf("%d: Kind: %s Title: %-10s RelPermalink: %-10s Path: %-10s sections: %s\n",
i+1,
p.Kind(), p.Title(), p.RelPermalink(), p.Path(), p.SectionsPath())
p.Kind(), p.Title(), p.RelPermalink(), p.Pathc(), p.SectionsPath())
}
}