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:
Paul Stack 2020-10-07 21:25:25 +01:00 committed by GitHub
parent b531038d33
commit 5e8f219652
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View file

@ -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}

View file

@ -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}