Skip to content

Commit

Permalink
refactor(planner/static): Add config/_default configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pan93412 committed Feb 12, 2025
1 parent 43a6b48 commit 0fe05e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/static/identify.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ func (i *identify) PlanType() types.PlanType {
}

func (i *identify) Match(fs afero.Fs) bool {
return utils.HasFile(fs, "index.html", "hugo.toml", "config/_default/hugo.toml", "config.toml", "mkdocs.yml", "hugo.json", "hugo.yaml")
return utils.HasFile(fs, "index.html", "config.toml", "mkdocs.yml", "hugo.toml", "hugo.json", "hugo.yaml", "config/_default/hugo.toml", "config/_default/hugo.json", "config/_default/hugo.yaml")
}

func (i *identify) PlanMeta(options plan.NewPlannerOptions) types.PlanMeta {
serverless := utils.GetExplicitServerlessConfig(options.Config).TakeOr(true)

planMeta := types.PlanMeta{"serverless": strconv.FormatBool(serverless)}

if utils.HasFile(options.Source, "hugo.toml", "config/_default/hugo.toml", "hugo.json", "hugo.yaml") {
if utils.HasFile(options.Source, "hugo.toml", "hugo.json", "hugo.yaml", "config/_default/hugo.toml", "config/_default/hugo.json", "config/_default/hugo.yaml") {
planMeta["framework"] = "hugo"
return planMeta
}
Expand Down

0 comments on commit 0fe05e0

Please sign in to comment.