Skip to content

Commit ab8e642

Browse files
DOC-4623 attempted fix for tab issues
1 parent f40b834 commit ab8e642

File tree

4 files changed

+17
-10
lines changed

4 files changed

+17
-10
lines changed

build/components/example.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@
1111
GO_OUTPUT = 'Output:'
1212
TEST_MARKER = {
1313
'java': '@Test',
14+
'java-sync': '@Test',
15+
'java-async': '@Test',
16+
'java-reactive': '@Test',
1417
'c#': '\[Fact\]|\[SkipIfRedis\(.*\)\]'
1518
}
1619
PREFIXES = {
1720
'python': '#',
1821
'node.js': '//',
1922
'java': '//',
23+
'java-sync': '//',
24+
'java-async': '//',
25+
'java-reactive': '//',
2026
'go': '//',
2127
'c#': '//',
2228
'redisvl': '#',

config.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tagManagerId = "GTM-TKZ6J9R"
4545
gitHubRepo = "https://github.com/redis/docs"
4646

4747
# Display and sort order for client examples
48-
clientsExamples = ["Python", "Node.js", "Java Sync", "Java Async", "Java Reactive", "Go", "C#", "RedisVL"]
48+
clientsExamples = ["Python", "Node.js", "Java-Sync", "Java-Async", "Java-Reactive", "Go", "C#", "RedisVL"]
4949
searchService = "/convai/api/search-service"
5050
ratingsService = "/docusight/api/rate"
5151

@@ -59,9 +59,9 @@ rdi_cli_latest = "latest"
5959
[params.clientsConfig]
6060
"Python"={quickstartSlug="redis-py"}
6161
"Node.js"={quickstartSlug="nodejs"}
62-
"Java sync"={quickstartSlug="jedis"}
63-
"Java async"={quickstartSlug="lettuce"}
64-
"Java reactive"={quickstartSlug="lettuce"}
62+
"Java-sync"={quickstartSlug="jedis"}
63+
"Java-async"={quickstartSlug="lettuce"}
64+
"Java-reactive"={quickstartSlug="lettuce"}
6565
"Go"={quickstartSlug="go"}
6666
"C#"={quickstartSlug="dotnet"}
6767
"RedisVL"={quickstartSlug="redis-vl"}

data/components/jedis.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"id": "jedis",
33
"type": "client",
44
"name": "jedis",
5-
"language": "Java",
6-
"label": "Java Sync",
5+
"language": "Java-Sync",
6+
"label": "Java-Sync",
77
"repository": {
88
"git_uri": "https://github.com/redis/jedis"
99
},
1010
"examples": {
11-
"git_uri": "https://github.com/redis/jedis",
12-
"dev_branch": "master",
11+
"git_uri": "/Users/andrew.stark/Documents/Repos/forks/jedis",
12+
"dev_branch": "DOC-4560-trans-pipe-examples",
1313
"path": "src/test/java/io/redis/examples",
1414
"pattern": "*.java"
1515
}

layouts/partials/tabbed-clients-example.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,19 @@
2121
{{ $clientConfig := index $.Site.Params.clientsconfig $client }}
2222
{{ $language := index $example "language" }}
2323
{{ $quickstartSlug := index $clientConfig "quickstartSlug" }}
24-
24+
2525
{{ if and ($example) (or (eq $lang "") (eq $lang $client)) }}
2626
{{ $examplePath := index $example "target" }}
2727
{{ $options := printf "linenos=false" }}
28-
28+
2929
{{ if and (ne $step "") (isset $example "named_steps") (isset $example.named_steps $step) }}
3030
{{ $options = printf "%s,hl_lines=%s" $options (index $example.named_steps $step) }}
3131
{{ else }}
3232
{{ if isset $example "highlight" }}
3333
{{ $options = printf "%s,hl_lines=%s" $options (delimit (index $example "highlight") " ") }}
3434
{{ end }}
3535
{{ end }}
36+
{{ if hasPrefix $language "java" }}{{ $language = "java"}}{{ end }}
3637
{{ $params := dict "language" $language "contentPath" $examplePath "options" $options }}
3738
{{ $content := partial "tabs/source.html" $params }}
3839
{{ $tabs = $tabs | append (dict "title" $client "language" $client "quickstartSlug" $quickstartSlug "content" $content "sourceUrl" (index $example "sourceUrl")) }}

0 commit comments

Comments
 (0)