mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 22:51:32 -05:00
parent
3f0f7eed68
commit
c5287e7817
1 changed files with 3 additions and 4 deletions
|
@ -176,7 +176,7 @@ func NewTheme(cmd *cobra.Command, args []string) error {
|
||||||
jww.INFO.Println("creating theme at", createpath)
|
jww.INFO.Println("creating theme at", createpath)
|
||||||
|
|
||||||
if x, _ := helpers.Exists(createpath, hugofs.SourceFs); x {
|
if x, _ := helpers.Exists(createpath, hugofs.SourceFs); x {
|
||||||
jww.FATAL.Fatalln(createpath, "already exists")
|
return newUserError(createpath, "already exists")
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir(createpath, "layouts", "_default")
|
mkdir(createpath, "layouts", "_default")
|
||||||
|
@ -196,8 +196,7 @@ func NewTheme(cmd *cobra.Command, args []string) error {
|
||||||
|
|
||||||
err := helpers.WriteToDisk(filepath.Join(createpath, "archetypes", "default.md"), bytes.NewReader(archDefault), hugofs.SourceFs)
|
err := helpers.WriteToDisk(filepath.Join(createpath, "archetypes", "default.md"), bytes.NewReader(archDefault), hugofs.SourceFs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
return err
|
||||||
jww.FATAL.Fatalln(err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir(createpath, "static", "js")
|
mkdir(createpath, "static", "js")
|
||||||
|
@ -227,7 +226,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
err = helpers.WriteToDisk(filepath.Join(createpath, "LICENSE.md"), bytes.NewReader(by), hugofs.SourceFs)
|
err = helpers.WriteToDisk(filepath.Join(createpath, "LICENSE.md"), bytes.NewReader(by), hugofs.SourceFs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
createThemeMD(createpath)
|
createThemeMD(createpath)
|
||||||
|
|
Loading…
Reference in a new issue