Skip to content

Commit

Permalink
fix: #177 use rendered provider name in default template
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuochi committed Nov 18, 2022
1 parent edb4eab commit ed269f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/provider/template.go
Expand Up @@ -245,13 +245,15 @@ Import is supported using the following syntax:

const defaultProviderTemplate providerTemplate = `---
` + frontmatterComment + `
page_title: "{{.ProviderShortName}} Provider"
{{- $name := .ProviderShortName}}
{{- if ne .ProviderName .RenderedProviderName }}{{ $name = .RenderedProviderName}}{{ end }}
page_title: "{{$name}} Provider"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---
# {{.ProviderShortName}} Provider
# {{$name}} Provider
{{ .Description | trimspace }}
Expand Down

0 comments on commit ed269f3

Please sign in to comment.