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

26 lines
1015 B
HTML

{{ $currentVersion := index (findRE "[^/]+.*?" .RelPermalink) 1 }}
{{ $contribPath := print "/flux/" $currentVersion "/stdlib/contrib/" }}
{{ if in .RelPermalink $contribPath }}
{{ if not (eq .RelPermalink $contribPath) }}
{{ if eq .Kind "page" }}
{{ $name := replaceRE " function" "" .Title }}
<div class="important block">
<p>
<code>{{ $name | safeHTML }}</code> is a user-contributed function maintained by
the <a href="#package-author-and-maintainer">package author</a>.
</p>
</div>
{{ else if eq .Kind "section" }}
<div class="important block">
{{ $packageTitle := default .Title .Params.list_title }}
{{ $packageName := replaceRE `^(.*)( package)` "<code>$1</code>$2" $packageTitle }}
<p>
The {{ $packageName | safeHTML }} is a user-contributed package
maintained by the <a href="#package-author-and-maintainer">package author</a>.
</p>
</div>
{{ end }}
{{ end }}
{{ end }}