Skip to content

Commit

Permalink
Don't use Hugo for creating sites, drop useless info message that way
Browse files Browse the repository at this point in the history
  • Loading branch information
snipem committed Apr 9, 2020
1 parent bdcf53c commit 1c2956c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pkg/compose/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,6 @@ func Init(cliSettings CommandLineSettings) (config *Config) {
// Dont do these steps if only generate
config.CleanUp()

err = helpers.HugoRun([]string{"--quiet", "new", "site", config.HugoWorkingDir})
if err != nil {
log.Fatal(err)
}

createMonakoStructureInHugoFolder(config, cliSettings.MenuConfigFilePath)
}

Expand Down
8 changes: 8 additions & 0 deletions pkg/compose/hugo.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ func extractTheme(hugoWorkingDir string) {
// createMonakoStructureInHugoFolder extracts the Monako theme and copies the hugoconfig and menuconfig to the needed files
func createMonakoStructureInHugoFolder(composeConfig *Config, menuconfig string) {

var foldersToCreate = []string{"content", "themes"}
for _, folder := range foldersToCreate {
err := os.MkdirAll(filepath.Join(composeConfig.ContentWorkingDir, folder), standardFilemode)
if err != nil {
log.Fatal(err)
}
}

dir := filepath.Join(composeConfig.ContentWorkingDir, monakoMenuDirectory)
dst := filepath.Join(dir, "index.md")

Expand Down

0 comments on commit 1c2956c

Please sign in to comment.