commands/new: Embed site and theme skeletons

The skeletons are used when creating new sites and themes with the CLI.

Closes #11358
This commit is contained in:
Joe Mooring 2023-08-16 15:07:01 -07:00 committed by Bjørn Erik Pedersen
parent 90944aa261
commit b6538532f4
41 changed files with 465 additions and 203 deletions

View file

@ -14,7 +14,6 @@
package commands
import (
"bytes"
"errors"
"fmt"
"log"
@ -24,8 +23,6 @@ import (
"github.com/bep/simplecobra"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
"github.com/spf13/afero"
"github.com/spf13/pflag"
)
@ -123,11 +120,3 @@ func mkdir(x ...string) {
log.Fatal(err)
}
}
func touchFile(fs afero.Fs, filename string) {
mkdir(filepath.Dir(filename))
err := helpers.WriteToDisk(filename, bytes.NewReader([]byte{}), fs)
if err != nil {
log.Fatal(err)
}
}