diff --git a/layouts/docs/list.html b/layouts/docs/list.html index 5d762de3e..af4a85c4c 100644 --- a/layouts/docs/list.html +++ b/layouts/docs/list.html @@ -11,6 +11,7 @@

{{ .Title }}

{{ with .Params.plan }} {{ partial "plan-info.html" (dict "plan" .) }} {{ end }} + {{- partial "feature-info.html" . -}} {{ .Content }} {{ partial "section-index.html" . -}} diff --git a/layouts/docs/single.html b/layouts/docs/single.html index 00cb3ab91..60f83667e 100644 --- a/layouts/docs/single.html +++ b/layouts/docs/single.html @@ -1,3 +1,4 @@ {{ define "main" }} +{{ partial "feature-info.html" . }} {{ .Render "content" }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/feature-info.html b/layouts/partials/feature-info.html new file mode 100644 index 000000000..901b77524 --- /dev/null +++ b/layouts/partials/feature-info.html @@ -0,0 +1,25 @@ +{{ $currentPage := .Page.Permalink }} +{{ $features := .Site.Data.features }} + +{{ if not $features }} + {{ $features = getJSON "features.json" }} +{{ end }} + +{{ if $features }} +{{ range $features }} + {{ $docUrl := .documentation | default "" }} + {{ $cleanDocUrl := (index (split $docUrl "#") 0) }} + {{ if eq $cleanDocUrl $currentPage }} +
+

Who can use this feature

+ {{ $subscription_tier := index .entire_row "Subscription Tier" }} +
+ Icon + Supported on {{ $subscription_tier }} Plan +
+
+ {{ break }} + {{ end }} +{{ end }} +{{ end }} +