smithy

commit 5cbf0993ba04a8db85c6e38da4a68baefd2afc62

Author: Doug Hellmann <doug@doughellmann.com>

include static prefix in default config

The default configuration generated by `smithy generate` did not
include the static.prefix value, which is needed to make the templates
render. This commit adds a default value based on the setting in the
README.

Signed-off-by: Doug Hellmann <doug@doughellmann.com>

 pkg/smithy/config.go | 15 ++++++++++-----


diff --git a/pkg/smithy/config.go b/pkg/smithy/config.go
index 6e2a6aa23f53823d9ca91f3d69370735652cc02c..09f64992218e337bf01982093468146a26718c49 100644
--- a/pkg/smithy/config.go
+++ b/pkg/smithy/config.go
@@ -46,16 +46,18 @@ 	// staticReposBySlug is a map of the `repos` values
 	staticReposBySlug map[string]RepoConfig
 }
 
+type StaticConfig struct {
+	Root   string
+	Prefix string
+}
+
 type SmithyConfig struct {
 	Title       string `yaml:"title"`
 	Description string `yaml:"description"`
 	Host        string `yaml:"host"`
 	Git         GitConfig
-	Static      struct {
-		Root   string
-		Prefix string
-	}
-	Templates struct {
+	Static      StaticConfig
+	Templates   struct {
 		Dir string
 	}
 	Port int `yaml:"port"`
@@ -194,6 +196,9 @@ 		Title:       "Smithy, a lightweight git force",
 		Port:        3456,
 		Host:        "localhost",
 		Description: "Publish your git repositories with ease",
+		Static: StaticConfig{
+			Prefix: "/static/",
+		},
 	}
 }