Back to Yugabyte Db

Product

docs/layouts/_shortcodes/product.html

2026.1.0.0-b251.3 KB
Original Source

{{- $products := split (.Get 0) "," -}} {{- /* get the page path to determine version */ -}} {{- $path := split $.Page.File.Dir "/" -}} {{- /* version is the first path of the path. eg: preview/stable/v2.12 ...*/ -}} {{- $version := index $path 0 -}} {{- /* map of products to links and display */ -}} {{- $prodmap := dict "ysql" (slice "api/ysql/" "YSQL") "ycql" (slice "api/ycql/" "YCQL") "voyager" (slice "yugabyte-voyager" "YugabyteDB Voyager") "yba" (slice "yugabyte-platform" "YugabyteDB Anywhere") "ybm" (slice "yugabyte-cloud" "YugabyteDB Aeon") "cloud" (slice "yugabyte-cloud" "YugabyteDB Aeon") "ybd" (slice "reference/configuration/yugabyted" "yugabyted") "cdc" (slice "additional-features/change-data-capture/" "CDC") "ybdb" (slice "" "YugabyteDB") "db" (slice "" "YugabyteDB") -}} {{- $numproducts := len $products -}} {{- $count := 0 -}} {{- range $p := $products -}} {{- $p = trim (lower $p) " " -}} {{- $count = add $count 1 -}} {{- $info := index $prodmap $p -}} {{- $anchor := replace (index $info 1) " " " " | htmlUnescape -}} {{- /* for a specific add the link from the map with right display name */ -}} {{$anchor}} {{- /* don't add a comma to the last product */ -}} {{- if ne $numproducts $count -}} {{- print ", " }} {{end -}} {{- end -}}