shithub: hugo

Download patch

ref: 3574304c686af07991c970c89c0b77a1135359db
parent: 9c39593dee7d0cf02a5249b1711992a1eb94b1aa
author: Anthony Fok <[email protected]>
date: Wed Dec 16 15:41:33 EST 2015

Improve some random feedback messages

Also clean up a couple random comments.

--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -11,8 +11,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-//Package commands defines and implements command-line commands and flags used by Hugo. Commands and flags are implemented using
-//cobra.
+// Package commands defines and implements command-line commands and flags
+// used by Hugo. Commands and flags are implemented using Cobra.
 package commands
 
 import (
--- a/commands/new.go
+++ b/commands/new.go
@@ -144,10 +144,12 @@
 
 	createConfig(basepath, configFormat)
 
+	jww.FEEDBACK.Printf("Congratulations! Your new Hugo site is created in %q.\n", basepath)
+
 	return nil
 }
 
-// NewSite creates a new hugo site and initializes a structured Hugo directory.
+// NewSite creates a new Hugo site and initializes a structured Hugo directory.
 func NewSite(cmd *cobra.Command, args []string) error {
 	if len(args) < 1 {
 		return newUserError("path needs to be provided")
@@ -161,7 +163,6 @@
 	forceNew, _ := cmd.Flags().GetBool("force")
 
 	return doNewSite(createpath, forceNew)
-
 }
 
 // NewTheme creates a new Hugo theme.
@@ -176,7 +177,7 @@
 	}
 
 	createpath := helpers.AbsPathify(filepath.Join("themes", args[0]))
-	jww.INFO.Println("creating theme at", createpath)
+	jww.INFO.Println("Creating theme at", createpath)
 
 	if x, _ := helpers.Exists(createpath, hugofs.SourceFs); x {
 		return newUserError(createpath, "already exists")
--- a/commands/server.go
+++ b/commands/server.go
@@ -166,7 +166,7 @@
 
 		rootWatchDirs := strings.Join(helpers.UniqueStrings(helpers.ExtractRootPaths(watchDirs)), ",")
 
-		jww.FEEDBACK.Printf("Watching for changes in %s/{%s}\n", baseWatchDir, rootWatchDirs)
+		jww.FEEDBACK.Printf("Watching for changes in %s%s{%s}\n", baseWatchDir, helpers.FilePathSeparator, rootWatchDirs)
 		err := NewWatcher(serverPort)
 
 		if err != nil {
--- a/create/content.go
+++ b/create/content.go
@@ -113,7 +113,7 @@
 	editor := viper.GetString("NewContentEditor")
 
 	if editor != "" {
-		jww.FEEDBACK.Printf("Editing %s in %s.\n", name, editor)
+		jww.FEEDBACK.Printf("Editing %s with %q ...\n", name, editor)
 
 		cmd := exec.Command(editor, helpers.AbsPathify(path.Join(viper.GetString("contentDir"), name)))
 		cmd.Stdin = os.Stdin