Skip to content

Commit 5ef5342

Browse files
committed
fix: #177 use rendered provider name in default template
1 parent 2f535d3 commit 5ef5342

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/provider/template.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,15 @@ Import is supported using the following syntax:
245245

246246
const defaultProviderTemplate providerTemplate = `---
247247
` + frontmatterComment + `
248-
page_title: "{{.ProviderShortName}} Provider"
248+
{{- $name := .ProviderShortName}}
249+
{{- if ne .ProviderName .RenderedProviderName }}{{ $name = .RenderedProviderName}}{{ end }}
250+
page_title: "{{$name}} Provider"
249251
subcategory: ""
250252
description: |-
251253
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
252254
---
253255
254-
# {{.ProviderShortName}} Provider
256+
# {{$name}} Provider
255257
256258
{{ .Description | trimspace }}
257259

0 commit comments

Comments
 (0)