From ed269f3e07f5e9c49f1cec5e05903078a8a4dcc6 Mon Sep 17 00:00:00 2001 From: Fuochi Date: Wed, 31 Aug 2022 08:01:02 +0400 Subject: [PATCH] fix: #177 use rendered provider name in default template --- internal/provider/template.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/provider/template.go b/internal/provider/template.go index dcc1e541..61061429 100644 --- a/internal/provider/template.go +++ b/internal/provider/template.go @@ -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 }}