{{ $type := .Get "type" | default "articles" }} {{ $show := .Get "show" | default "all" }} {{ $hlevel := .Get "hlevel" | default "h3"}} {{ $readMore := .Get "readmore" | default false }} {{ $hr := .Get "hr" | default false }} {{ $doNotList := .Get "filterOut" | default "" }} {{ if eq $show "all" }} {{ .Scratch.Set "pages" (union .Page.Pages .Page.Sections) }} {{ else if (eq $show "sections") }} {{ .Scratch.Set "pages" .Page.Sections }} {{ else if (eq $show "pages") }} {{ .Scratch.Set "pages" .Page.RegularPages }} {{ end }} {{ $pages := where (.Scratch.Get "pages") "Title" "not in" (split $doNotList ", ") }} {{ if eq $type "articles" }}
{{- if .Description }}{{- .Description | markdownify -}} {{ else }}{{- .Summary | markdownify -}} {{ end -}}
{{ if .Params.list_image }} {{ $img := .Params.list_image }} {{ if (fileExists ( print "/static" $img )) }} {{ with (imageConfig ( print "/static" $img )) }} {{ $imageWidth := div .Width 3 }} {{ end }} {{ else }} {{ end }} {{ end }} {{ if .Params.list_code_example }} {{- $productPathData := findRE "[^/]+.*?" .Page.RelPermalink -}} {{- $currentVersion := index $productPathData 1 -}} {{- $isOSS := ne (len (findRE `^v[0-9]` $currentVersion)) 0 -}} {{- $productKey := cond $isOSS "oss" $currentVersion -}} {{- $productAliases := dict "oss" "influxdb" "cloud" "influxdb_cloud" "cloud-tsm" "influxdb_cloud" "cloud-serverless" "influxdb_cloud_serverless" "serverless" "influxdb_cloud_serverless" "cloud-dedicated" "influxdb_cloud_dedicated" "dedicated" "influxdb_cloud_dedicated" "clustered" "influxdb_clustered" -}} {{- $productRef := index $productAliases $productKey -}} {{- $productData := index .Site.Data.products $productRef -}} {{- $placeholderHost := $productData.placeholder_host }} {{ .Params.list_code_example | replaceRE `\{\{[<\%] influxdb/host [>%]\}\}` $placeholderHost | markdownify }} {{ end }} {{ if .Params.list_query_example }} {{ range (index .Site.Data.query_examples .Params.list_query_example) }} {{ .code | markdownify }}