mirror of
https://github.com/gohugoio/hugo.git
synced 2025-02-19 20:33:07 +00:00
parent
e02e0727e5
commit
32c6f656d9
1 changed files with 3 additions and 0 deletions
|
@ -53,6 +53,9 @@ draft: true
|
||||||
// NewContent creates a new content file in h (or a full bundle if the archetype is a directory)
|
// NewContent creates a new content file in h (or a full bundle if the archetype is a directory)
|
||||||
// in targetPath.
|
// in targetPath.
|
||||||
func NewContent(h *hugolib.HugoSites, kind, targetPath string) error {
|
func NewContent(h *hugolib.HugoSites, kind, targetPath string) error {
|
||||||
|
if h.BaseFs.Content.Dirs == nil {
|
||||||
|
return errors.New("no existing content directory configured for this project")
|
||||||
|
}
|
||||||
unlock, err := h.BaseFs.LockBuild()
|
unlock, err := h.BaseFs.LockBuild()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to acquire a build lock: %s", err)
|
return fmt.Errorf("failed to acquire a build lock: %s", err)
|
||||||
|
|
Loading…
Reference in a new issue