From 4be2c38bab8877d69d5f8f4a5f0370b6672fe0e6 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Mon, 10 Aug 2020 10:48:01 -0400 Subject: Add experimental mode Signed-off-by: Dave Henderson --- docs-src/content/functions/func_doc.md.tmpl | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'docs-src/content/functions/func_doc.md.tmpl') diff --git a/docs-src/content/functions/func_doc.md.tmpl b/docs-src/content/functions/func_doc.md.tmpl index c66b0d09..0e8668de 100644 --- a/docs-src/content/functions/func_doc.md.tmpl +++ b/docs-src/content/functions/func_doc.md.tmpl @@ -24,9 +24,23 @@ menu: {{ $data.preamble -}} +{{- define "annotations" -}} +{{ if has . "deprecated" }} _(deprecated)_{{ end -}} +{{ if and (has . "experimental") (index . "experimental") }} _(experimental)_{{ end -}} +{{ end -}} + {{ range $_, $f := $data.funcs }} -## {{ if has $f "rawName" }}{{ $f.rawName }}{{ else }}`{{ $f.name }}`{{ if has $f "deprecated" }} _(deprecated)_ -**Deprecation Notice:** {{ $f.deprecated }}{{ end }}{{ end }} +## {{ if has $f "rawName" -}} +{{ $f.rawName }}{{ else }}`{{ $f.name }}`{{ end }}{{ template "annotations" $f }} +{{ if has $f "deprecated" -}} +**Deprecation Notice:** {{ $f.deprecated }} +{{ end -}} +{{ if and (has . "experimental") (index . "experimental") -}} +**Experimental:** This function is [_experimental_][experimental] and may be enabled with the [`--experimental`][experimental] flag. + +[experimental]: ../config/#experimental +{{ end -}} + {{ if has $f "alias" }} **Alias:** `{{$f.alias}}` {{ end }} -- cgit v1.2.3