Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build/components/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@
GO_OUTPUT = 'Output:'
TEST_MARKER = {
'java': '@Test',
'java-sync': '@Test',
'java-async': '@Test',
'java-reactive': '@Test',
'c#': '\[Fact\]|\[SkipIfRedis\(.*\)\]'
}
PREFIXES = {
'python': '#',
'node.js': '//',
'java': '//',
'java-sync': '//',
'java-async': '//',
'java-reactive': '//',
'go': '//',
'c#': '//',
'redisvl': '#',
Expand Down
8 changes: 4 additions & 4 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ tagManagerId = "GTM-TKZ6J9R"
gitHubRepo = "https://github.com/redis/docs"

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

Expand All @@ -59,9 +59,9 @@ rdi_cli_latest = "latest"
[params.clientsConfig]
"Python"={quickstartSlug="redis-py"}
"Node.js"={quickstartSlug="nodejs"}
"Java sync"={quickstartSlug="jedis"}
"Java async"={quickstartSlug="lettuce"}
"Java reactive"={quickstartSlug="lettuce"}
"Java-sync"={quickstartSlug="jedis"}
"Java-async"={quickstartSlug="lettuce"}
"Java-reactive"={quickstartSlug="lettuce"}
"Go"={quickstartSlug="go"}
"C#"={quickstartSlug="dotnet"}
"RedisVL"={quickstartSlug="redis-vl"}
Expand Down
4 changes: 2 additions & 2 deletions data/components/jedis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"id": "jedis",
"type": "client",
"name": "jedis",
"language": "Java",
"label": "Java Sync",
"language": "Java-Sync",
"label": "Java-Sync",
"repository": {
"git_uri": "https://github.com/redis/jedis"
},
Expand Down
4 changes: 2 additions & 2 deletions data/components/lettuce_async.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"id": "lettuce_async",
"type": "client",
"name": "lettuce_async",
"language": "Java",
"label": "Java Async",
"language": "Java-Async",
"label": "Java-Async",
"repository": {
"git_uri": "https://github.com/redis/lettuce"
},
Expand Down
4 changes: 2 additions & 2 deletions data/components/lettuce_reactive.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"id": "lettuce_reactive",
"type": "client",
"name": "lettuce_reactive",
"language": "Java",
"label": "Java Reactive",
"language": "Java-Reactive",
"label": "Java-Reactive",
"repository": {
"git_uri": "https://github.com/redis/lettuce"
},
Expand Down
5 changes: 3 additions & 2 deletions layouts/partials/tabbed-clients-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@
{{ $clientConfig := index $.Site.Params.clientsconfig $client }}
{{ $language := index $example "language" }}
{{ $quickstartSlug := index $clientConfig "quickstartSlug" }}

{{ if and ($example) (or (eq $lang "") (eq $lang $client)) }}
{{ $examplePath := index $example "target" }}
{{ $options := printf "linenos=false" }}

{{ if and (ne $step "") (isset $example "named_steps") (isset $example.named_steps $step) }}
{{ $options = printf "%s,hl_lines=%s" $options (index $example.named_steps $step) }}
{{ else }}
{{ if isset $example "highlight" }}
{{ $options = printf "%s,hl_lines=%s" $options (delimit (index $example "highlight") " ") }}
{{ end }}
{{ end }}
{{ if hasPrefix $language "java" }}{{ $language = "java"}}{{ end }}
{{ $params := dict "language" $language "contentPath" $examplePath "options" $options }}
{{ $content := partial "tabs/source.html" $params }}
{{ $tabs = $tabs | append (dict "title" $client "language" $client "quickstartSlug" $quickstartSlug "content" $content "sourceUrl" (index $example "sourceUrl")) }}
Expand Down
3 changes: 2 additions & 1 deletion layouts/partials/tabs/wrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
{{ $tid := printf "%s_%s" (replace (replace (index $tab "title") "#" "sharp") "." "") $id }}
{{ $pid := printf "panel_%s" $tid }}
{{ $dataLang := replace (or (index $tab "language") "redis-cli") "C#" "dotnet" }}
{{ $dataLang := replace $dataLang "." "-" }}
<input tabindex="1" type="radio" name="{{ $id }}" id="{{ $tid }}" data-lang="{{ $dataLang }}" class="radiotab w-0 h-0"
{{ if eq $i 0 }}checked{{ end }}
/>
<label class="justify-left label ml-4 pt-3.5 px-3 pb-1 cursor-pointer text-sm text-center bg-redis-ink-900
<label class="justify-left label ml-1.5 pt-3.5 px-1 pb-1 cursor-pointer text-sm text-center bg-redis-ink-900
hover:text-redis-red-600 rounded rounded-mx transition duration-150 ease-in-out"
title="Open example" for="{{ $tid }}">
{{ if eq (index $tab "title") "redis-cli" }}
Expand Down
Loading