Back to Yugabyte Db

Api Tabs

docs/layouts/_shortcodes/api-tabs.html

2026.1.0.0-b25592 B
Original Source

{{- /* Both the pages should of the format: -ycql.md, -ysql.md */ -}} {{- $tabs := default "ycql,ysql" (.Get "list") -}} {{- $path := (path.Split $.Page.File).File -}} {{- $markdownPath := substr $path -3 }} {{- if ne $markdownPath ".md" }} {{- $path = printf "%s%s" $path ".md" -}} {{- end -}} {{- $active := "ysql" -}} {{- if strings.Contains $path "-ycql." -}} {{- $active = "ycql" -}} {{- end -}} {{- $path = strings.TrimSuffix ".md" $path -}} {{- $path = strings.TrimSuffix "-ysql" $path -}} {{- $path = strings.TrimSuffix "-ycql" $path -}} {{- $page := default $path (.Get "page") -}}