summaryrefslogtreecommitdiff
path: root/docs-src/content/functions/func_doc.md.tmpl
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2020-08-10 10:48:01 -0400
committerDave Henderson <dhenderson@gmail.com>2020-08-23 19:31:31 -0400
commit4be2c38bab8877d69d5f8f4a5f0370b6672fe0e6 (patch)
tree3f9edd6bddeaaba5717f490231bd35eebdf58891 /docs-src/content/functions/func_doc.md.tmpl
parent406832735e6c2d4f1598502405058f543b1ca16e (diff)
Add experimental mode
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'docs-src/content/functions/func_doc.md.tmpl')
-rw-r--r--docs-src/content/functions/func_doc.md.tmpl18
1 files changed, 16 insertions, 2 deletions
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 }}