From 019546066701efb9ef391c7a20ed866006cc0c49 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Tue, 24 Nov 2015 15:48:01 +1100 Subject: [PATCH] Categorize more pages --- _/layouts/home.html | 23 +++++++++++++++-------- _config.yml | 14 ++++++++++++++ commanderjs.md | 1 + css-animation.md | 1 + css-antialias.md | 1 + css-background.md | 3 ++- css-flexbox.md | 1 + css-font.md | 1 + css-selectors.md | 1 + css.md | 1 + curl.md | 1 + find.md | 1 + gh-pages.md | 1 + gulp.md | 1 + handlebarsjs.md => handlebars-js.md | 1 + harveyjs.md => harvey-js.md | 1 + ie.md | 1 + ie_bugs.md | 1 + inkscape.md | 1 + javascript-workers.md | 1 + jquery-cdn.md | 1 + jquery.md | 1 + js-appcache.md | 1 + js-array.md | 1 + js-date.md | 1 + js-model.md | 1 + jscoverage.md | 1 + nodejs-assert.md | 3 ++- nodejs-fs.md | 3 ++- nodejs-path.md | 3 ++- nodejs-process.md | 3 ++- nodejs.md | 1 + nopt.md | 1 + npm.md | 1 + tig.md | 1 + travis-gh-pages.md | 1 + underscore-string.md | 1 + vim-digraphs.md | 1 + vim-easyalign.md | 1 + vim-help.md | 1 + vim-rails.md | 1 + vim-unite.md | 1 + vim.md | 1 + vimscript-functions.md | 1 + vimscript-snippets.md | 1 + vimscript.md | 1 + vows.md | 1 + webpack.md | 1 + weechat.md | 1 + weinre.md | 1 + yargs.md | 1 + 51 files changed, 83 insertions(+), 13 deletions(-) rename handlebarsjs.md => handlebars-js.md (95%) rename harveyjs.md => harvey-js.md (92%) diff --git a/_/layouts/home.html b/_/layouts/home.html index 93c0bb3ea76..a67ff380a82 100644 --- a/_/layouts/home.html +++ b/_/layouts/home.html @@ -4,13 +4,20 @@ {% include head.html %} {% include site-header.html %} -
- {% for page in site.pages %} - - {{ page.title }} - {{ page.url }} - - {% endfor %} -
+{% for category in site.category_names %} +
+

{{ category }}

+
+
+ {% 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 de8cc16fc87..76ebfadda11 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 c44900302cf..5e3da4583ca 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 291d8151092..21cb5c77dc4 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 8da7214fb7b..f6ee50248f5 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 89f03c96d3c..e254e06ec51 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 68066643f1e..872573fad3f 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 41feee094cd..0e00fdcb17f 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 06fe6997cee..34ef6ef829b 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 76d1c1c7c61..2596c834765 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 b7fdb30ee3b..32708acd55b 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 2a5de2b99e6..174e513dcd9 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 876fdd3ad3b..e41c7fc579b 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 da4180de816..63631c60969 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 6812e580d37..c015272cdb2 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 707b737a15a..e1fbf7487d6 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 27b3d6063b8..48d9c2c7d7b 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 16479e6c579..e66899b859b 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 9793ecf7afc..cb77d65c311 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 cf0c04b2699..2a72064dab3 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 7195abe122c..03f1a68f578 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 4dcf31351cb..66bb1f3bac2 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 e8cb9b485fd..bcf6335f515 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 0fc525159bb..e593d5dbc60 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 ab2ff9ce944..494fc227d1c 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 fb166b578b8..cedccb54b34 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 795043c59fe..7c44f57f8e8 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 7750353f46a..0f86b98d151 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 425d6e1d700..5b3e7b12acf 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 74e2b1fb9c7..ec8942e4364 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 ab5e1d87c27..af3f91a81b2 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 579b548a284..165cbbb3854 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 12793998bd4..d2ac7c100d2 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 0c876b36379..26e69c8db64 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 fd8fdb0ad63..e93647bfcc2 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 30144dd4d87..5ee5f7bd894 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 63ca5092991..6a2452b8efa 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 90bfc842c27..2b4bc6ac568 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 a99abbe052a..e6c36f8268d 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 846ace53ade..a0feaccb028 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 e22800b31f4..a82d81a3e22 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 444503f8da2..95daa4e44a5 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 115e0ca0961..1d0f8bca930 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 050264c259b..518d7b49d6d 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 f845c91b52c..97f3ed60759 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 65db68ea7b1..27d6b2c2c2b 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 800eb2eed0b..6fe584fad40 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 b7052ecdb42..951ffc2ec1e 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 6f0e56b550b..c769b148364 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 461468aad1c..da6d14a517d 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 aab18038718..38f2dd27962 100644 --- a/yargs.md +++ b/yargs.md @@ -1,5 +1,6 @@ --- title: Yargs +category: JavaScript --- ### Basic usage