Revert "commands: Add .gitignore "hugo new site""
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 16 Oct 2018 06:43:38 +0000 (08:43 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 16 Oct 2018 06:43:38 +0000 (08:43 +0200)
This fails on Windows, so it needs to be reconsidered.

This reverts commit 92979d92889ff8991acfadd42982c2e55d01b163.

commands/new_site.go

index 3d62bd44c16c86fb82d9970c104919568e3074e4..3e4cf4561c44e2102c6be86c9026b663b00e481f 100644 (file)
@@ -97,7 +97,6 @@ func (n *newSiteCmd) doNewSite(fs *hugofs.Fs, basepath string, force bool) error
        }
 
        createConfig(fs, basepath, n.configFormat)
-       createGitignore(fs, basepath)
 
        // Create a default archetype file.
        helpers.SafeWriteToDisk(filepath.Join(archeTypePath, "default.md"),
@@ -142,14 +141,6 @@ func createConfig(fs *hugofs.Fs, inpath string, kind string) (err error) {
        return helpers.WriteToDisk(filepath.Join(inpath, "config."+kind), &buf, fs.Source)
 }
 
-func createGitignore(fs *hugofs.Fs, inpath string) (err error) {
-       var gitignore bytes.Buffer
-
-       gitignore.WriteString("public/")
-
-       return helpers.WriteToDisk(filepath.Join(inpath, ".gitignore"), &gitignore, fs.Source)
-}
-
 func nextStepsText() string {
        var nextStepsText bytes.Buffer