mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-23 19:21:26 +00:00
Improve some random feedback messages
Also clean up a couple random comments.
This commit is contained in:
parent
9c39593dee
commit
3574304c68
4 changed files with 8 additions and 7 deletions
|
@ -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 (
|
||||
|
|
|
@ -144,10 +144,12 @@ func doNewSite(basepath string, force bool) error {
|
|||
|
||||
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 @@ func NewSite(cmd *cobra.Command, args []string) error {
|
|||
forceNew, _ := cmd.Flags().GetBool("force")
|
||||
|
||||
return doNewSite(createpath, forceNew)
|
||||
|
||||
}
|
||||
|
||||
// NewTheme creates a new Hugo theme.
|
||||
|
@ -176,7 +177,7 @@ func NewTheme(cmd *cobra.Command, args []string) error {
|
|||
}
|
||||
|
||||
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")
|
||||
|
|
|
@ -166,7 +166,7 @@ func server(cmd *cobra.Command, args []string) error {
|
|||
|
||||
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 {
|
||||
|
|
|
@ -113,7 +113,7 @@ func NewContent(kind, name string) (err error) {
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue