diff --git a/commands/new_theme.go b/commands/new_theme.go index e01790dee..3a3677c85 100644 --- a/commands/new_theme.go +++ b/commands/new_theme.go @@ -80,6 +80,22 @@ func (n *newThemeCmd) newTheme(cmd *cobra.Command, args []string) error { touchFile(cfg.Fs.Source, createpath, "layouts", "_default", "list.html") touchFile(cfg.Fs.Source, createpath, "layouts", "_default", "single.html") + baseofDefault := []byte(` + {{- partial "head.html" . -}} + + {{- partial "header.html" . -}} +
+ {{- block "main" . }}{{- end }} +
+ {{- partial "footer.html" . -}} + + +`) + err = helpers.WriteToDisk(filepath.Join(createpath, "layouts", "_default", "baseof.html"), bytes.NewReader(baseofDefault), cfg.Fs.Source) + if err != nil { + return err + } + touchFile(cfg.Fs.Source, createpath, "layouts", "partials", "header.html") touchFile(cfg.Fs.Source, createpath, "layouts", "partials", "footer.html")