diff --git a/assets/images/icons.png b/assets/images/icons.png
index bde86806..20187782 100644
Binary files a/assets/images/icons.png and b/assets/images/icons.png differ
diff --git a/assets/images/icons@2x.png b/assets/images/icons@2x.png
index 91e4ebc5..86f9eb42 100644
Binary files a/assets/images/icons@2x.png and b/assets/images/icons@2x.png differ
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee
index 0941da85..df890842 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -148,6 +148,11 @@ credits = [
'1990-2013 Python Software Foundation
Python is a trademark of the Python Software Foundation.',
'PSFL',
'http://docs.python.org/3/license.html'
+ ], [
+ 'Redis',
+ '2006-2013 Salvatore Sanfilippo and others',
+ 'BSD',
+ 'https://raw.github.com/antirez/redis/unstable/COPYING'
], [
'Ruby',
'1993-2013 Yukihiro Matsumoto',
diff --git a/assets/javascripts/templates/pages/news_tmpl.coffee b/assets/javascripts/templates/pages/news_tmpl.coffee
index e6d2bafb..2a47db95 100644
--- a/assets/javascripts/templates/pages/news_tmpl.coffee
+++ b/assets/javascripts/templates/pages/news_tmpl.coffee
@@ -25,7 +25,7 @@ newsItem = (date, news) ->
app.news = [
[ 1386892800000, # December 13, 2013
- """ New Git documentation """
+ """ New Git and Redis documentations """
], [
1385424000000, # November 26, 2013
""" New Python documentation """
diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss
index 9e3d3c43..4a9ed2ee 100644
--- a/assets/stylesheets/application.css.scss
+++ b/assets/stylesheets/application.css.scss
@@ -38,6 +38,7 @@
'pages/node',
'pages/php',
'pages/rdoc',
+ 'pages/redis',
'pages/rfc',
'pages/sphinx',
'pages/underscore',
diff --git a/assets/stylesheets/global/_base.scss b/assets/stylesheets/global/_base.scss
index 7d36d8a3..c14d26b0 100644
--- a/assets/stylesheets/global/_base.scss
+++ b/assets/stylesheets/global/_base.scss
@@ -87,7 +87,7 @@ abbr, acronym, dfn {
border-bottom: 1px dotted $textColor;
}
-pre, code, samp {
+pre, code, samp, %pre {
font-family: $monoFont;
font-weight: normal;
font-style: normal;
@@ -98,7 +98,7 @@ pre, code, samp {
tab-size: 2;
}
-pre {
+pre, %pre {
margin: 1.5em 0;
padding: .375rem .75rem;
line-height: 1.5;
diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss
index c7a56322..3c8f7bb1 100644
--- a/assets/stylesheets/global/_icons.scss
+++ b/assets/stylesheets/global/_icons.scss
@@ -43,3 +43,4 @@
._icon-rails:before { background-position: -4rem -5rem; }
._icon-python:before { background-position: 0 -6rem; }
._icon-git:before { background-position: -1rem -6rem; }
+._icon-redis:before { background-position: -2rem -6rem; }
diff --git a/assets/stylesheets/pages/_redis.scss b/assets/stylesheets/pages/_redis.scss
new file mode 100644
index 00000000..229a458a
--- /dev/null
+++ b/assets/stylesheets/pages/_redis.scss
@@ -0,0 +1,44 @@
+._redis {
+ // Index
+
+ > .commands {
+ padding-left: 0;
+ list-style: none;
+
+ > li { margin-bottom: 1em; }
+ }
+
+ .command, .summary { display: block; }
+
+ .args {
+ font-size: .75rem;
+ color: $textColorLight;
+ }
+
+ // Others
+
+ > h2 { @extend %block-heading; }
+ p > code { @extend %label; }
+
+ > .metadata { @extend %note, %note-green; }
+ > .metadata > p { margin: 0; }
+
+ > .example {
+ white-space: normal;
+ @extend %pre;
+
+ > .prompt {
+ float: left;
+ margin-right: .5em;
+ color: $textColorLight;
+ }
+
+ > code {
+ display: block;
+ clear: left;
+ margin-bottom: .5em;
+
+ &:last-child { margin-bottom: 0; }
+ }
+ }
+}
diff --git a/lib/docs/filters/redis/clean_html.rb b/lib/docs/filters/redis/clean_html.rb
new file mode 100644
index 00000000..2a3f5059
--- /dev/null
+++ b/lib/docs/filters/redis/clean_html.rb
@@ -0,0 +1,21 @@
+module Docs
+ class Redis
+ class CleanHtmlFilter < Filter
+ def call
+ at_css('ul')['class'] = 'commands' if root_page?
+
+ css('nav', 'aside', 'form').remove
+
+ css('> article', 'pre > code').each do |node|
+ node.before(node.children).remove
+ end
+
+ css('.example > pre').each do |node|
+ node.name = 'code'
+ end
+
+ doc
+ end
+ end
+ end
+end
diff --git a/lib/docs/filters/redis/entries.rb b/lib/docs/filters/redis/entries.rb
new file mode 100644
index 00000000..3caae5c8
--- /dev/null
+++ b/lib/docs/filters/redis/entries.rb
@@ -0,0 +1,26 @@
+module Docs
+ class Redis
+ class EntriesFilter < Docs::EntriesFilter
+ def get_name
+ slug.gsub('-', ' ')
+ end
+
+ def get_type
+ case at_css('aside > ul:last-child a').content.strip
+ when 'DEL' then 'Keys'
+ when 'APPEND' then 'Strings'
+ when 'HDEL' then 'Hashes'
+ when 'BLPOP' then 'Lists'
+ when 'SADD' then 'Sets'
+ when 'ZADD' then 'Sorted Sets'
+ when 'PSUBSCRIBE' then 'Pub/Sub'
+ when 'DISCARD' then 'Transactions'
+ when 'EVAL' then 'Scripting'
+ when 'AUTH' then 'Connection'
+ when 'BGREWRITEAOF' then 'Server'
+ else 'Miscellaneous'
+ end
+ end
+ end
+ end
+end
diff --git a/lib/docs/scrapers/redis.rb b/lib/docs/scrapers/redis.rb
new file mode 100644
index 00000000..ca90d425
--- /dev/null
+++ b/lib/docs/scrapers/redis.rb
@@ -0,0 +1,19 @@
+module Docs
+ class Redis < UrlScraper
+ self.type = 'redis'
+ self.version = 'up to 2.8.3'
+ self.base_url = 'http://redis.io/commands'
+
+ html_filters.push 'redis/entries', 'redis/clean_html', 'title'
+
+ options[:container] = ->(filter) { filter.root_page? ? '#commands' : '.text' }
+ options[:title] = false
+ options[:root_title] = 'Redis'
+ options[:follow_links] = ->(filter) { filter.root_page? }
+
+ options[:attribution] = <<-HTML
+ © 2006–2013 Salvatore Sanfilippo and others
+ Licensed under the three clause BSD license.
+ HTML
+ end
+end
diff --git a/public/icons/docs/redis/16.png b/public/icons/docs/redis/16.png
new file mode 100644
index 00000000..6d1f2b7f
Binary files /dev/null and b/public/icons/docs/redis/16.png differ
diff --git a/public/icons/docs/redis/16@2x.png b/public/icons/docs/redis/16@2x.png
new file mode 100644
index 00000000..9db97221
Binary files /dev/null and b/public/icons/docs/redis/16@2x.png differ
diff --git a/public/icons/docs/redis/SOURCE b/public/icons/docs/redis/SOURCE
new file mode 100644
index 00000000..8eb6dbb1
--- /dev/null
+++ b/public/icons/docs/redis/SOURCE
@@ -0,0 +1 @@
+http://redis.io/documentation