Reorder resource docs templates to make deprecated more prominent (#5523)
Fixes: https://github.com/pulumi/docs/issues/4340 The deprecated message sits below the examples so it is not clear to the user that the resource / datasource is deprecated
This commit is contained in:
parent
b531038d33
commit
5e8f219652
8
pkg/codegen/docs/templates/function.tmpl
vendored
8
pkg/codegen/docs/templates/function.tmpl
vendored
|
@ -3,15 +3,15 @@
|
|||
{{ htmlSafe "<!-- WARNING: this file was generated by" }} {{ .Tool }}. {{ htmlSafe "-->" }}
|
||||
{{ htmlSafe "<!-- Do not edit by hand unless you're certain you know what you are doing! -->" }}
|
||||
|
||||
{{- if .DeprecationMessage }}
|
||||
<p class="resource-deprecated">Deprecated: {{ print "{{% md %}}" -}}{{- .DeprecationMessage -}}{{- print "{{% /md %}}" -}}</p>
|
||||
{{- end }}
|
||||
|
||||
{{ htmlSafe .Comment }}
|
||||
{{- if ne (len .ExamplesSection) 0 }}
|
||||
{{ template "examples" .ExamplesSection }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .DeprecationMessage }}
|
||||
<p class="resource-deprecated">Deprecated: {{ print "{{% md %}}" -}}{{- .DeprecationMessage -}}{{- print "{{% /md %}}" -}}</p>
|
||||
{{- end }}
|
||||
|
||||
<!-- Input properties -->
|
||||
## Using {{ .Header.Title }} {#using}
|
||||
|
||||
|
|
8
pkg/codegen/docs/templates/resource.tmpl
vendored
8
pkg/codegen/docs/templates/resource.tmpl
vendored
|
@ -3,15 +3,15 @@
|
|||
{{ htmlSafe "<!-- WARNING: this file was generated by" }} {{ .Tool }}. {{ htmlSafe "-->" }}
|
||||
{{ htmlSafe "<!-- Do not edit by hand unless you're certain you know what you are doing! -->" }}
|
||||
|
||||
{{- if .DeprecationMessage }}
|
||||
<p class="resource-deprecated">Deprecated: {{ print "{{% md %}}" -}}{{- .DeprecationMessage -}}{{- print "{{% /md %}}" -}}</p>
|
||||
{{- end }}
|
||||
|
||||
{{ htmlSafe .Comment }}
|
||||
{{- if ne (len .ExamplesSection) 0 }}
|
||||
{{ template "examples" .ExamplesSection }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .DeprecationMessage }}
|
||||
<p class="resource-deprecated">Deprecated: {{ print "{{% md %}}" -}}{{- .DeprecationMessage -}}{{- print "{{% /md %}}" -}}</p>
|
||||
{{- end }}
|
||||
|
||||
<!-- Create resource -->
|
||||
## Create a {{ .Header.Title }} Resource {#create}
|
||||
|
||||
|
|
Loading…
Reference in a new issue