Skip to content

Commit

Permalink
feat: create output directory if it does not exist
Browse files Browse the repository at this point in the history
This improves the user experience
  • Loading branch information
ashishb committed Nov 24, 2024
1 parent dae277f commit 3a98678
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wp2hugo/internal/hugogenerator/hugo_gen_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ func (g Generator) setupHugo(outputDirPath string) (*string, error) {
commands := []string{
"git version",
"hugo version",
fmt.Sprintf("mkdir -p %s", outputDirPath),
// Use YAML file as it is easier to edit it afterward than TOML
fmt.Sprintf("cd %s && hugo new site %s --format yaml", outputDirPath, siteName),
fmt.Sprintf("cd %s && git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1",
Expand Down

0 comments on commit 3a98678

Please sign in to comment.