File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 33{{ $lang := .Scratch.Get "lang" }}
44{{ $redisCommands := .Scratch.Get "redisCommands" }}
55{{ $redisCommandsLineLimit := (or (.Scratch.Get "maxLines") 100) }}
6+ {{ $cliTabName := (or (.Scratch.Get "cli_tab_name") "> _ Redis CLI") }}
67
78{{ if not (isset $.Site.Data.examples $id) }}
89 {{ warnf "[tabbed-clients-example] Example not found %q for %q" $id $.Page }}
1213{{/* Render redis-cli example from inner content if any */}}
1314{{ if (ne (trim $redisCommands "\n") "") }}
1415 {{ $redisCliContent := highlight (trim $redisCommands "\n") "plaintext" (printf "linenos=false,hl_lines=1-%d" $redisCommandsLineLimit ) }}
15- {{ $tabs = $tabs | append (dict "title" "redis-cli" "content" $redisCliContent "limit" $redisCommandsLineLimit) }}
16+ {{ $tabs = $tabs | append (dict "title" "redis-cli" "displayName" $cliTabName " content" $redisCliContent "limit" $redisCommandsLineLimit) }}
1617{{ end }}
1718
1819{{ $clientExamples := index $.Site.Data.examples $id }}
Original file line number Diff line number Diff line change 2121 hover:text-redis-red-600 rounded rounded-mx transition duration-150 ease-in-out "
2222 title ="Open example " for ="{{ $tid }} ">
2323 {{ if eq (index $tab "title") "redis-cli" }}
24- {{ $cliName }}
24+ {{ or (index $tab "displayName") $cliName }}
2525 {{ else }}
2626 {{ index $tab "title" }}
2727 {{ end }}
Original file line number Diff line number Diff line change 22{{ .Scratch.Set "step" (.Get 1) }}
33{{ .Scratch.Set "lang" (.Get 2) }}
44{{ .Scratch.Set "maxLines" (.Get 3) }}
5+ {{ .Scratch.Set "cli_tab_name" (.Get 4) }}
56{{ .Scratch.Set "redisCommands" .Inner }}
67{{ partial "tabbed-clients-example.html" . }}
You can’t perform that action at this time.
0 commit comments