Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned up RS clients index page and added an auto-generating table shortcode #1467

Merged
merged 1 commit into from
Jul 29, 2021
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
12 changes: 9 additions & 3 deletions content/rs/references/client_references/_index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
---
Title: Developing with Redis Clients
description:
Title: Develop with Redis clients
linkTitle: Redis clients
description: Redis client libraries allow you to connect to Redis instances from within your application. This section provides an overview of several recommended Redis clients for popular programming and scripting languages.
weight: 80
alwaysopen: false
categories: ["RS"]
---
To connect to Redis instances from within your application, use a Redis client library that matches your application's language.

{{< allchildren style="h2" description="true" />}}
The [Redis Clients page](https://redis.io/clients) contains a list of available Redis client libraries for a variety of popular programming and scripting languages.

The following links discuss a few recommended clients in more detail, including installation instructions and usage examples.

{{< table-children columnNames="Language,Client reference" columnSources="LinkTitle,Title" enableLinks="Title" >}}
3 changes: 2 additions & 1 deletion content/rs/references/client_references/client_c.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
Title: Using Redis with C
Title: Redis with C
linkTitle: C
description:
weight:
alwaysopen: false
Expand Down
3 changes: 2 additions & 1 deletion content/rs/references/client_references/client_csharp.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
Title: Using Redis with .NET
Title: Redis with .NET
linkTitle: .NET
description:
weight:
alwaysopen: false
Expand Down
3 changes: 2 additions & 1 deletion content/rs/references/client_references/client_drupal.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
Title: Using Redis with Drupal 7
Title: Redis with Drupal 7
linkTitle: Drupal
description:
weight:
alwaysopen: false
Expand Down
3 changes: 2 additions & 1 deletion content/rs/references/client_references/client_ioredis.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
Title: Using Redis with Node.js (ioredis)
Title: Redis with Node.js (ioredis)
linkTitle: Node.js (ioredis)
description:
weight:
alwaysopen: false
Expand Down
3 changes: 2 additions & 1 deletion content/rs/references/client_references/client_java.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
Title: Using Redis with Java
Title: Redis with Java
linkTitle: Java
description:
weight:
alwaysopen: false
Expand Down
3 changes: 2 additions & 1 deletion content/rs/references/client_references/client_nodejs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
Title: Using Redis with Node.js (node_redis)
Title: Redis with Node.js (node_redis)
linkTitle: Node.js (node_redis)
description:
weight:
alwaysopen: false
Expand Down
3 changes: 2 additions & 1 deletion content/rs/references/client_references/client_php.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
Title: Using Redis with PHP
Title: Redis with PHP
linkTitle: PHP
description:
weight:
alwaysopen: false
Expand Down
3 changes: 2 additions & 1 deletion content/rs/references/client_references/client_python.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
Title: Using Redis with Python
Title: Redis with Python
linkTitle: Python
description:
weight:
alwaysopen: false
Expand Down
3 changes: 2 additions & 1 deletion content/rs/references/client_references/client_ruby.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
Title: Using Redis with Ruby
Title: Redis with Ruby
linkTitle: Ruby
description:
weight: $weight
alwaysopen: false
Expand Down
40 changes: 40 additions & 0 deletions layouts/shortcodes/table-children.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{{ $columnNamesStr := .Get "columnNames" }}
{{ $columnNames := split $columnNamesStr "," }}
{{ $columnSourcesStr := .Get "columnSources" }}
{{ $columnSources := split $columnSourcesStr "," }}
{{ $enableLinksStr := .Get "enableLinks" }}
{{ $enableLinks := split $enableLinksStr "," }}
{{ $children := .Page.Pages }}

<table>
<thead>
<tr>
{{ range $i, $column := $columnNames }}
<th style="text-align:left">{{ $column }}</th>
{{ end }}
</tr>
</thead>

<tbody>
{{ range $i, $child := $children }}
<tr>
{{ range $j, $cSource := $columnSources }}
{{ if eq $cSource "LinkTitle" }}
{{ if in $enableLinks $cSource }}
<td style="text-align:left"><a href="{{$child.RelPermalink}}" >{{ $child.LinkTitle }}</a></td>
{{ else }}
<td style="text-align:left">{{ $child.LinkTitle }}</td>
{{ end }}
{{ end }}
{{ if eq $cSource "Title" }}
{{ if in $enableLinks $cSource }}
<td style="text-align:left"><a href="{{$child.RelPermalink}}" >{{ $child.Title }}</a></td>
{{ else }}
<td style="text-align:left">{{ $child.Title }}</td>
{{ end }}
{{ end }}
{{ end }}
</tr>
{{ end }}
</tbody>
</table>