This was a un-intended change in Hugo 0.42. Most sites will have a static directory so this should not be a big issue, but this commit will revert back to old behaviour.
Fixes #4846
List: {{ .Title }}
-`)
-
- writeFile(t, filepath.Join(d, "static", "my.txt"), `
-MyMy
-
`)
return d, nil
copyStaticFunc := func() error {
cnt, err := c.copyStatic()
if err != nil {
- return fmt.Errorf("Error copying static files: %s", err)
+ if !os.IsNotExist(err) {
+ return fmt.Errorf("Error copying static files: %s", err)
+ }
+ c.Logger.WARN.Println("No Static directory found")
}
langCount = cnt
langCount = cnt