commands: Move nextStepsText() to new_site.go - hugo - [fork] hugo port for 9front
 (HTM) git clone git@git.drkhsh.at/hugo.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit d3dd74fd655c22f21e91e38edb1d377a1357e3be
 (DIR) parent 80230f26a3020ff33bac2bef01b2c0e314b89f86
 (HTM) Author: Anthony Fok <foka@debian.org>
       Date:   Mon, 11 Jun 2018 01:38:50 -0600
       
       commands: Move nextStepsText() to new_site.go
       
       Diffstat:
         M commands/new.go                     |      21 ---------------------
         M commands/new_site.go                |      37 ++++++++++++++++++++++---------
       
       2 files changed, 26 insertions(+), 32 deletions(-)
       ---
 (DIR) diff --git a/commands/new.go b/commands/new.go
       @@ -126,27 +126,6 @@ func (n *newCmd) newContent(cmd *cobra.Command, args []string) error {
                return create.NewContent(ps, siteFactory, kind, createPath)
        }
        
       -func nextStepsText() string {
       -        var nextStepsText bytes.Buffer
       -
       -        nextStepsText.WriteString(`Just a few more steps and you're ready to go:
       -
       -1. Download a theme into the same-named folder.
       -   Choose a theme from https://themes.gohugo.io/, or
       -   create your own with the "hugo new theme <THEMENAME>" command.
       -2. Perhaps you want to add some content. You can add single files
       -   with "hugo new `)
       -
       -        nextStepsText.WriteString(filepath.Join("<SECTIONNAME>", "<FILENAME>.<FORMAT>"))
       -
       -        nextStepsText.WriteString(`".
       -3. Start the built-in live server via "hugo server".
       -
       -Visit https://gohugo.io/ for quickstart guide and full documentation.`)
       -
       -        return nextStepsText.String()
       -}
       -
        func mkdir(x ...string) {
                p := filepath.Join(x...)
        
 (DIR) diff --git a/commands/new_site.go b/commands/new_site.go
       @@ -15,24 +15,18 @@ package commands
        
        import (
                "bytes"
       -        "path/filepath"
       -
       -        "github.com/spf13/viper"
       -
                "errors"
       -
       -        "github.com/gohugoio/hugo/create"
       -
                "fmt"
       -
       +        "path/filepath"
                "strings"
        
       -        "github.com/gohugoio/hugo/parser"
       -
       +        "github.com/gohugoio/hugo/create"
                "github.com/gohugoio/hugo/helpers"
                "github.com/gohugoio/hugo/hugofs"
       +        "github.com/gohugoio/hugo/parser"
                "github.com/spf13/cobra"
                jww "github.com/spf13/jwalterweatherman"
       +        "github.com/spf13/viper"
        )
        
        var _ cmder = (*newSiteCmd)(nil)
       @@ -104,7 +98,7 @@ func (n *newSiteCmd) doNewSite(fs *hugofs.Fs, basepath string, force bool) error
        
                createConfig(fs, basepath, n.configFormat)
        
       -        // Create a defaul archetype file.
       +        // Create a default archetype file.
                helpers.SafeWriteToDisk(filepath.Join(archeTypePath, "default.md"),
                        strings.NewReader(create.ArchetypeTemplateTemplate), fs.Source)
        
       @@ -146,3 +140,24 @@ func createConfig(fs *hugofs.Fs, inpath string, kind string) (err error) {
        
                return helpers.WriteToDisk(filepath.Join(inpath, "config."+kind), &buf, fs.Source)
        }
       +
       +func nextStepsText() string {
       +        var nextStepsText bytes.Buffer
       +
       +        nextStepsText.WriteString(`Just a few more steps and you're ready to go:
       +
       +1. Download a theme into the same-named folder.
       +   Choose a theme from https://themes.gohugo.io/, or
       +   create your own with the "hugo new theme <THEMENAME>" command.
       +2. Perhaps you want to add some content. You can add single files
       +   with "hugo new `)
       +
       +        nextStepsText.WriteString(filepath.Join("<SECTIONNAME>", "<FILENAME>.<FORMAT>"))
       +
       +        nextStepsText.WriteString(`".
       +3. Start the built-in live server via "hugo server".
       +
       +Visit https://gohugo.io/ for quickstart guide and full documentation.`)
       +
       +        return nextStepsText.String()
       +}