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:
Noah Campbell
2013-10-31 15:46:55 -07:00
parent 861472bea5
commit 789aa6ad76
2 changed files with 16 additions and 7 deletions

View File

@@ -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+"/"))
}