Skip to content

Commit

Permalink
An initial Modules section.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed May 12, 2017
1 parent 59f4385 commit 10d822c
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
6 changes: 6 additions & 0 deletions app.rb
Expand Up @@ -246,6 +246,12 @@ def not_found(locals = {path: nil})
custom_render("clients")
end

on get, "modules" do
@modules = JSON.parse(File.read(documentation_path + "/modules.json"))
@modules = @modules.sort_by {|m| -m["stars"]}
custom_render("modules")
end

on get, "topics/:name" do |name|
path = "/topics/#{name}.md"

Expand Down
6 changes: 3 additions & 3 deletions views/layout.haml
Expand Up @@ -39,9 +39,9 @@
%li
%a(href="/download") Download
%li
%a(href="/support") Support
%a(href="/modules") Modules
%li
%a(href="/topics/license") License
%a(href="/support") Support

.site-wrapper

Expand All @@ -62,8 +62,8 @@
%a(href="/documentation") Documentation
%a(href="/community") Community
%a(href="/download") Download
%a(href="/modules") Modules
%a(href="/support") Support
%a(href="/topics/license") License

- if Date.today < Date.new(2017, 5, 5)
%aside.wide-callout
Expand Down
41 changes: 41 additions & 0 deletions views/modules.haml
@@ -0,0 +1,41 @@
.site-content
.text
%section#clients

%h1 Redis Modules

%p
This is a list of Redis modules, for Redis v4.0 or greater, ordered by Github stars. Only modules under an OSI approved license are listed here. Also to have the source code hosted at Github is currently mandatory. To add your module here please send a pull request for <a href="https://github.com/antirez/redis-doc/blob/master/modules.json">the modules.json file</a> in the <a href="https://github.com/antirez/redis-doc">Redis-doc</a> repository.

%table
%col(class="name")
%col(class="license")
%col(class="stars")
%col(class="repository")
%col(class="description")
%col(class="authors")

- @modules.each do |mod|
%tr
%td
= mod["name"]

%td
- if mod["repository"]
%a(href="#{mod["repository"]}" class="icon")
%i(class="fa fa-home")

%td.description
= mod["description"]

%td.authors
- if mod["authors"]
- mod["authors"].each do |author|
%a(href="https://github.com/#{author}") #{author}

%td
= mod["license"]

%td
#{mod["stars"]}
%i(class="fa fa-star icon-star")

0 comments on commit 10d822c

Please sign in to comment.