From 34d72cbbc97041032a7a675efae9fc4785cb7f2d Mon Sep 17 00:00:00 2001
From: Henrique Dias <hacdias@gmail.com>
Date: Sun, 27 Sep 2015 20:33:36 +0100
Subject: [PATCH] update

---
 config/config.go | 18 +++---------------
 utils/utils.go   |  2 +-
 2 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/config/config.go b/config/config.go
index 61b400ef..74d2e519 100644
--- a/config/config.go
+++ b/config/config.go
@@ -1,7 +1,6 @@
 package config
 
 import (
-	"strconv"
 	"strings"
 
 	"github.com/mholt/caddy/config/setup"
@@ -9,17 +8,15 @@ import (
 
 // Config is the add-on configuration set on Caddyfile
 type Config struct {
-	Styles string
-	Args   []string
-
-	Hugo    bool
+	Styles  string
+	Args    []string
 	Command string
 	Content string
 }
 
 // ParseCMS parses the configuration file
 func ParseCMS(c *setup.Controller) (*Config, error) {
-	conf := &Config{Hugo: true, Content: "content"}
+	conf := &Config{Content: "content"}
 
 	for c.Next() {
 		for c.NextBlock() {
@@ -33,15 +30,6 @@ func ParseCMS(c *setup.Controller) (*Config, error) {
 				conf.Styles = strings.TrimPrefix(conf.Styles, "/")
 				// Add a beginning slash to make a
 				conf.Styles = "/" + conf.Styles
-			case "hugo":
-				if !c.NextArg() {
-					return nil, c.ArgErr()
-				}
-				var err error
-				conf.Hugo, err = strconv.ParseBool(c.Val())
-				if err != nil {
-					return conf, err
-				}
 			case "content":
 				if !c.NextArg() {
 					return nil, c.ArgErr()
diff --git a/utils/utils.go b/utils/utils.go
index 9144ba60..f4ba18df 100644
--- a/utils/utils.go
+++ b/utils/utils.go
@@ -161,7 +161,7 @@ func ParseComponents(r *http.Request) []string {
 
 // Run is used to run the static website generator
 func Run(c *config.Config) {
-	if !c.Hugo {
+	if c.Command != "" {
 		out, err := exec.Command(c.Command, c.Args...).Output()
 		if err != nil {
 			log.Panic("Can't execute the commands defined on Caddyfile.")