mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Use MkdirAll instead of Mkdir in hugo gen doc
Also print a feedback if the path does not exist and needs to be created.
This commit is contained in:
parent
de82404d35
commit
e1af7cb9d0
1 changed files with 2 additions and 1 deletions
|
@ -50,7 +50,8 @@ for rendering in Hugo.`,
|
||||||
gendocdir += helpers.FilePathSeparator
|
gendocdir += helpers.FilePathSeparator
|
||||||
}
|
}
|
||||||
if found, _ := helpers.Exists(gendocdir, hugofs.OsFs); !found {
|
if found, _ := helpers.Exists(gendocdir, hugofs.OsFs); !found {
|
||||||
hugofs.OsFs.Mkdir(gendocdir, 0777)
|
jww.FEEDBACK.Println("Directory", gendocdir, "does not exist, creating...")
|
||||||
|
hugofs.OsFs.MkdirAll(gendocdir, 0777)
|
||||||
}
|
}
|
||||||
now := time.Now().Format(time.RFC3339)
|
now := time.Now().Format(time.RFC3339)
|
||||||
prepender := func(filename string) string {
|
prepender := func(filename string) string {
|
||||||
|
|
Loading…
Reference in a new issue