diff --git a/_/layouts/home.html b/_/layouts/home.html
index 93c0bb3ea..a67ff380a 100644
--- a/_/layouts/home.html
+++ b/_/layouts/home.html
@@ -4,13 +4,20 @@ html_class: home
{% include head.html %}
{% include site-header.html %}
-
- {% for page in site.pages %}
-
- {{ page.title }}
- {{ page.url }}
-
- {% endfor %}
-
+{% for category in site.category_names %}
+
+
+ {% for page in site.pages %}
+ {% if page.category == category %}
+
+ {{ page.title }}
+ {{ page.url }}
+
+ {% endif %}
+ {% endfor %}
+
+{% endfor %}
{% include foot.html %}
diff --git a/_config.yml b/_config.yml
index de8cc16fc..76ebfadda 100644
--- a/_config.yml
+++ b/_config.yml
@@ -26,6 +26,7 @@ defaults:
path: ""
values:
layout: "default"
+ category: "Others"
# Site info
url: http://ricostacruz.com/cheatsheets
@@ -35,3 +36,16 @@ title: Cheatsheets
analytics:
hostname: ricostacruz.com
id: "UA-20473929-1"
+
+category_names:
+ - Ruby
+ - Ansible
+ - Git
+ - Apps
+ - JavaScript
+ - Node.js
+ - HTML
+ - CSS
+ - Command line
+ - VIM
+ - Others
diff --git a/commanderjs.md b/commanderjs.md
index c44900302..5e3da4583 100644
--- a/commanderjs.md
+++ b/commanderjs.md
@@ -1,5 +1,6 @@
---
title: Commander.js
+category: JavaScript
---
### Initialize
diff --git a/css-animation.md b/css-animation.md
index 291d81510..21cb5c77d 100644
--- a/css-animation.md
+++ b/css-animation.md
@@ -1,5 +1,6 @@
---
title: CSS animations
+category: CSS
---
animation: bounce 300ms linear 100ms infinite alternate-reverse;
diff --git a/css-antialias.md b/css-antialias.md
index 8da7214fb..f6ee50248 100644
--- a/css-antialias.md
+++ b/css-antialias.md
@@ -1,5 +1,6 @@
---
title: CSS antialiasing
+category: CSS
---
* {
diff --git a/css-background.md b/css-background.md
index 89f03c96d..e254e06ec 100644
--- a/css-background.md
+++ b/css-background.md
@@ -1,5 +1,6 @@
---
-title: CSS
+title: CSS background
+category: CSS
---
Background
diff --git a/css-flexbox.md b/css-flexbox.md
index 68066643f..872573fad 100644
--- a/css-flexbox.md
+++ b/css-flexbox.md
@@ -1,5 +1,6 @@
---
title: CSS flexbox
+category: CSS
---
.container {
diff --git a/css-font.md b/css-font.md
index 41feee094..0e00fdcb1 100644
--- a/css-font.md
+++ b/css-font.md
@@ -1,5 +1,6 @@
---
title: CSS font
+category: CSS
---
font: italic 400 14px / 1.5 sans-serif;
diff --git a/css-selectors.md b/css-selectors.md
index 06fe6997c..34ef6ef82 100644
--- a/css-selectors.md
+++ b/css-selectors.md
@@ -1,5 +1,6 @@
---
title: CSS selectors
+category: CSS
---
[attr="value"] /* = exact */
diff --git a/css.md b/css.md
index 76d1c1c7c..2596c8347 100644
--- a/css.md
+++ b/css.md
@@ -1,5 +1,6 @@
---
title: CSS tricks
+category: CSS
---
### Heading kerning pairs and ligature
diff --git a/curl.md b/curl.md
index b7fdb30ee..32708acd5 100644
--- a/curl.md
+++ b/curl.md
@@ -1,5 +1,6 @@
---
title: Curl
+category: Command line
---
Options:
diff --git a/find.md b/find.md
index 2a5de2b99..174e513dc 100644
--- a/find.md
+++ b/find.md
@@ -1,5 +1,6 @@
---
title: Find
+category: Command line
---
### Usage
diff --git a/gh-pages.md b/gh-pages.md
index 876fdd3ad..e41c7fc57 100644
--- a/gh-pages.md
+++ b/gh-pages.md
@@ -1,5 +1,6 @@
---
title: GitHub pages
+category: Git
---
$ echo "foobar.com" > CNAME
diff --git a/gulp.md b/gulp.md
index da4180de8..63631c609 100644
--- a/gulp.md
+++ b/gulp.md
@@ -1,5 +1,6 @@
---
title: Gulp
+category: JavaScript
---
* gulp-ruby-sass
diff --git a/handlebarsjs.md b/handlebars-js.md
similarity index 95%
rename from handlebarsjs.md
rename to handlebars-js.md
index 6812e580d..c015272cd 100644
--- a/handlebarsjs.md
+++ b/handlebars-js.md
@@ -1,5 +1,6 @@
---
title: Handlebars.js
+category: JavaScript
---
### Helpers
diff --git a/harveyjs.md b/harvey-js.md
similarity index 92%
rename from harveyjs.md
rename to harvey-js.md
index 707b737a1..e1fbf7487 100644
--- a/harveyjs.md
+++ b/harvey-js.md
@@ -1,5 +1,6 @@
---
title: Harvey.js
+category: JavaScript
---
### Usage
diff --git a/ie.md b/ie.md
index 27b3d6063..48d9c2c7d 100644
--- a/ie.md
+++ b/ie.md
@@ -1,5 +1,6 @@
---
title: Internet Explorer
+category: HTML
---
## CSS Selectors
diff --git a/ie_bugs.md b/ie_bugs.md
index 16479e6c5..e66899b85 100644
--- a/ie_bugs.md
+++ b/ie_bugs.md
@@ -1,5 +1,6 @@
---
title: IE bugs
+category: HTML
---
### IE8: 'change' event doesn't always fire
diff --git a/inkscape.md b/inkscape.md
index 9793ecf7a..cb77d65c3 100644
--- a/inkscape.md
+++ b/inkscape.md
@@ -1,5 +1,6 @@
---
title: Inkscape
+category: Apps
---
### All
diff --git a/javascript-workers.md b/javascript-workers.md
index cf0c04b26..2a72064da 100644
--- a/javascript-workers.md
+++ b/javascript-workers.md
@@ -1,5 +1,6 @@
---
title: JavaScript workers
+category: JavaScript
---
## Web workers
diff --git a/jquery-cdn.md b/jquery-cdn.md
index 7195abe12..03f1a68f5 100644
--- a/jquery-cdn.md
+++ b/jquery-cdn.md
@@ -1,5 +1,6 @@
---
title: jQuery CDN
+category: JavaScript
---
### Google jQuery
diff --git a/jquery.md b/jquery.md
index 4dcf31351..66bb1f3ba 100644
--- a/jquery.md
+++ b/jquery.md
@@ -1,5 +1,6 @@
---
title: jQuery
+category: JavaScript
---
### Traversing
diff --git a/js-appcache.md b/js-appcache.md
index e8cb9b485..bcf6335f5 100644
--- a/js-appcache.md
+++ b/js-appcache.md
@@ -1,5 +1,6 @@
---
title: applicationCache
+category: JavaScript
---
### applicationCache checking
diff --git a/js-array.md b/js-array.md
index 0fc525159..e593d5dbc 100644
--- a/js-array.md
+++ b/js-array.md
@@ -1,5 +1,6 @@
---
title: JavaScript arrays
+category: JavaScript
---
## JavaScript arrays
diff --git a/js-date.md b/js-date.md
index ab2ff9ce9..494fc227d 100644
--- a/js-date.md
+++ b/js-date.md
@@ -1,5 +1,6 @@
---
title: JavaScript Date
+category: JavaScript
---
### Constructor
diff --git a/js-model.md b/js-model.md
index fb166b578..cedccb54b 100644
--- a/js-model.md
+++ b/js-model.md
@@ -1,5 +1,6 @@
---
title: Js-Model
+category: JavaScript
---
Project = Model "project", ->
diff --git a/jscoverage.md b/jscoverage.md
index 795043c59..7c44f57f8 100644
--- a/jscoverage.md
+++ b/jscoverage.md
@@ -1,5 +1,6 @@
---
title: jscoverage
+category: JavaScript
---
Also see [mocha-blanket](mocha-blanket.html).
diff --git a/nodejs-assert.md b/nodejs-assert.md
index 7750353f4..0f86b98d1 100644
--- a/nodejs-assert.md
+++ b/nodejs-assert.md
@@ -1,5 +1,6 @@
---
-title: Node.js - assert
+title: assert
+category: Node.js
---
assert(val)
diff --git a/nodejs-fs.md b/nodejs-fs.md
index 425d6e1d7..5b3e7b12a 100644
--- a/nodejs-fs.md
+++ b/nodejs-fs.md
@@ -1,5 +1,6 @@
---
-title: Node.js - fs
+title: fs
+category: Node.js
---
### Reading
diff --git a/nodejs-path.md b/nodejs-path.md
index 74e2b1fb9..ec8942e43 100644
--- a/nodejs-path.md
+++ b/nodejs-path.md
@@ -1,5 +1,6 @@
---
-title: Node.js - path
+title: path
+category: Node.js
---
fs.realpath('/etc/passwd', function(err, path) { /* "/private/etc/passwd" */
diff --git a/nodejs-process.md b/nodejs-process.md
index ab5e1d87c..af3f91a81 100644
--- a/nodejs-process.md
+++ b/nodejs-process.md
@@ -1,5 +1,6 @@
---
-title: Node.js - process
+title: process
+category: Node.js
---
### Streams
diff --git a/nodejs.md b/nodejs.md
index 579b548a2..165cbbb38 100644
--- a/nodejs.md
+++ b/nodejs.md
@@ -1,5 +1,6 @@
---
title: Node.js API
+category: Node.js
---
## Globals
diff --git a/nopt.md b/nopt.md
index 12793998b..d2ac7c100 100644
--- a/nopt.md
+++ b/nopt.md
@@ -1,5 +1,6 @@
---
title: Nopt
+category: JavaScript
---
```js
diff --git a/npm.md b/npm.md
index 0c876b363..26e69c8db 100644
--- a/npm.md
+++ b/npm.md
@@ -1,5 +1,6 @@
---
title: npm
+category: JavaScript
---
npm install
diff --git a/tig.md b/tig.md
index fd8fdb0ad..e93647bfc 100644
--- a/tig.md
+++ b/tig.md
@@ -1,5 +1,6 @@
---
title: Tig
+category: Git
---
### Installing
diff --git a/travis-gh-pages.md b/travis-gh-pages.md
index 30144dd4d..5ee5f7bd8 100644
--- a/travis-gh-pages.md
+++ b/travis-gh-pages.md
@@ -1,5 +1,6 @@
---
title: Deploy gh-pages via Travis
+category: Git
---
Taken from https://medium.com/@nthgergo/publishing-gh-pages-with-travis-ci-53a8270e87db
diff --git a/underscore-string.md b/underscore-string.md
index 63ca50929..6a2452b8e 100644
--- a/underscore-string.md
+++ b/underscore-string.md
@@ -1,5 +1,6 @@
---
title: Underscore-string
+category: JavaScript
---
### Usage
diff --git a/vim-digraphs.md b/vim-digraphs.md
index 90bfc842c..2b4bc6ac5 100644
--- a/vim-digraphs.md
+++ b/vim-digraphs.md
@@ -1,5 +1,6 @@
---
title: Vim digraphs
+category: Vim
---
### Typing digraphs in insert mode
diff --git a/vim-easyalign.md b/vim-easyalign.md
index a99abbe05..e6c36f826 100644
--- a/vim-easyalign.md
+++ b/vim-easyalign.md
@@ -2,6 +2,7 @@
title: Vim Easyalign
html_class: key-codes
hljs_languages: [vim]
+category: Vim
---
## Command mode
diff --git a/vim-help.md b/vim-help.md
index 846ace53a..a0feaccb0 100644
--- a/vim-help.md
+++ b/vim-help.md
@@ -1,5 +1,6 @@
---
title: Vim helpfiles
+category: Vim
---
```
diff --git a/vim-rails.md b/vim-rails.md
index e22800b31..a82d81a3e 100644
--- a/vim-rails.md
+++ b/vim-rails.md
@@ -1,5 +1,6 @@
---
title: Vim-rails
+category: Vim
html_class: key-codes
---
diff --git a/vim-unite.md b/vim-unite.md
index 444503f8d..95daa4e44 100644
--- a/vim-unite.md
+++ b/vim-unite.md
@@ -1,5 +1,6 @@
---
title: Vim-Unite
+category: Vim
---
### Usage
diff --git a/vim.md b/vim.md
index 115e0ca09..1d0f8bca9 100644
--- a/vim.md
+++ b/vim.md
@@ -1,5 +1,6 @@
---
title: vim
+category: Vim
---
* [Digraphs](vim-digraphs.html)
diff --git a/vimscript-functions.md b/vimscript-functions.md
index 050264c25..518d7b49d 100644
--- a/vimscript-functions.md
+++ b/vimscript-functions.md
@@ -1,5 +1,6 @@
---
title: Vimscript functions
+category: Vim
---
Dictionaries
diff --git a/vimscript-snippets.md b/vimscript-snippets.md
index f845c91b5..97f3ed607 100644
--- a/vimscript-snippets.md
+++ b/vimscript-snippets.md
@@ -1,5 +1,6 @@
---
title: Vimscript snippets
+category: Vim
---
### Bind function to key and command
diff --git a/vimscript.md b/vimscript.md
index 65db68ea7..27d6b2c2c 100644
--- a/vimscript.md
+++ b/vimscript.md
@@ -1,5 +1,6 @@
---
title: Vim script
+category: Vim
hljs_languages: [vim]
---
diff --git a/vows.md b/vows.md
index 800eb2eed..6fe584fad 100644
--- a/vows.md
+++ b/vows.md
@@ -1,5 +1,6 @@
---
title: Vows
+category: JavaScript
---
* [Vowsjs.org](http://vowsjs.org/)
diff --git a/webpack.md b/webpack.md
index b7052ecdb..951ffc2ec 100644
--- a/webpack.md
+++ b/webpack.md
@@ -1,5 +1,6 @@
---
title: Webpack
+category: JavaScript
---
### Config
diff --git a/weechat.md b/weechat.md
index 6f0e56b55..c769b1483 100644
--- a/weechat.md
+++ b/weechat.md
@@ -1,5 +1,6 @@
---
title: Weechat
+category: Apps
---
### Keys
diff --git a/weinre.md b/weinre.md
index 461468aad..da6d14a51 100644
--- a/weinre.md
+++ b/weinre.md
@@ -1,5 +1,6 @@
---
title: Weinre
+category: JavaScript
---
* [Weinre](http://people.apache.org/~pmuellr/weinre/)
diff --git a/yargs.md b/yargs.md
index aab180387..38f2dd279 100644
--- a/yargs.md
+++ b/yargs.md
@@ -1,5 +1,6 @@
---
title: Yargs
+category: JavaScript
---
### Basic usage