mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
create content at any level of nesting
This commit is contained in:
@@ -414,7 +414,11 @@ func (s *Site) WritePublic(path string, content []byte) {
|
||||
path, filename := filepath.Split(path)
|
||||
|
||||
path = filepath.FromSlash(s.c.GetAbsPath(filepath.Join(s.c.PublishDir, path)))
|
||||
mkdirIf(path)
|
||||
err := mkdirIf(path)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
file, _ := os.Create(filepath.Join(path, filename))
|
||||
defer file.Close()
|
||||
|
Reference in New Issue
Block a user