docs-v2/layouts/partials/article/flux-experimental.html

25 lines
1.1 KiB
HTML

{{ $currentVersion := index (findRE "[^/]+.*?" .RelPermalink) 1 }}
{{ $expRiskURL := print "/flux/v0.x/stdlib/experimental/#experimental-packages-are-subject-to-change" }}
{{ $expPath := print "/flux/v0.x/stdlib/experimental/" }}
{{ if in .RelPermalink $expPath }}
{{ if not (eq .RelPermalink $expPath) }}
{{ if eq .Kind "page" }}
{{ $name := replaceRE " function" "" .Title }}
<div class="warn block">
<p>
<code>{{ $name | safeHTML }}</code> is {{ if in $name "experimental" }}{{ else }}experimental and{{ end }} <a href="{{ $expRiskURL }}">subject to change at any time</a>.
</p>
</div>
{{ else if eq .Kind "section" }}
<div class="warn block">
{{ $packageTitle := cond (isset .Params "list_title") $.Params.list_title .Title }}
{{ $packageName := replaceRE `^(.*)( package)` "<code>$1</code>$2" $packageTitle }}
<p>
The {{ $packageName | safeHTML }} is experimental and <a href="{{ $expRiskURL }}">subject to change at any time</a>.
</p>
</div>
{{ end }}
{{ end }}
{{ end }}