mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Removing check for directory: static, layouts
Removed these checks so a single file in content can generate a site. For example, given a site with a content directory and an index.html, running hugo -s dir will generate a project without any more input.
This commit is contained in:
@@ -100,6 +100,11 @@ func build(watches ...bool) {
|
||||
}
|
||||
|
||||
func copyStatic() error {
|
||||
staticDir := Config.GetAbsPath(Config.StaticDir + "/")
|
||||
if _, err := os.Stat(staticDir); os.IsNotExist(err) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Copy Static to Destination
|
||||
return fsync.Sync(Config.GetAbsPath(Config.PublishDir+"/"), Config.GetAbsPath(Config.StaticDir+"/"))
|
||||
}
|
||||
|
Reference in New Issue
Block a user