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 3
3
{{ $lang := .Scratch.Get "lang" }}
4
4
{{ $redisCommands := .Scratch.Get "redisCommands" }}
5
5
{{ $redisCommandsLineLimit := (or (.Scratch.Get "maxLines") 100) }}
6
+ {{ $cliTabName := (or (.Scratch.Get "cli_tab_name") "> _ Redis CLI") }}
6
7
7
8
{{ if not (isset $.Site.Data.examples $id) }}
8
9
{{ warnf "[tabbed-clients-example] Example not found %q for %q" $id $.Page }}
12
13
{{/* Render redis-cli example from inner content if any */}}
13
14
{{ if (ne (trim $redisCommands "\n") "") }}
14
15
{{ $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) }}
16
17
{{ end }}
17
18
18
19
{{ $clientExamples := index $.Site.Data.examples $id }}
Original file line number Diff line number Diff line change 21
21
hover:text-redis-red-600 rounded rounded-mx transition duration-150 ease-in-out "
22
22
title ="Open example " for ="{{ $tid }} ">
23
23
{{ if eq (index $tab "title") "redis-cli" }}
24
- {{ $cliName }}
24
+ {{ or (index $tab "displayName") $cliName }}
25
25
{{ else }}
26
26
{{ index $tab "title" }}
27
27
{{ end }}
Original file line number Diff line number Diff line change 2
2
{{ .Scratch.Set "step" (.Get 1) }}
3
3
{{ .Scratch.Set "lang" (.Get 2) }}
4
4
{{ .Scratch.Set "maxLines" (.Get 3) }}
5
+ {{ .Scratch.Set "cli_tab_name" (.Get 4) }}
5
6
{{ .Scratch.Set "redisCommands" .Inner }}
6
7
{{ partial "tabbed-clients-example.html" . }}
You can’t perform that action at this time.
0 commit comments