From 1a2c80b1212affcfd63042619546425bd465e2f3 Mon Sep 17 00:00:00 2001 From: zhulinpinyu Date: Tue, 23 Feb 2016 21:58:00 +0800 Subject: [PATCH] use new theme --- .jekyll-metadata | Bin 0 -> 44897 bytes 404.html | 26 +- CNAME | 1 + Gruntfile.js | 73 + LICENSE | 202 + README.md | 47 +- README.zh.md | 234 + Rakefile | 309 - _config.yml | 224 +- _includes/JB/analytics | 14 - _includes/JB/analytics-providers/getclicky | 12 - _includes/JB/analytics-providers/google | 11 - _includes/JB/analytics-providers/mixpanel | 11 - _includes/JB/categories_list | 37 - _includes/JB/comments | 16 - _includes/JB/comments-providers/disqus | 14 - _includes/JB/comments-providers/facebook | 9 - _includes/JB/comments-providers/intensedebate | 6 - _includes/JB/comments-providers/livefyre | 6 - _includes/JB/liquid_raw | 32 - _includes/JB/pages_list | 39 - _includes/JB/posts_collate | 67 - _includes/JB/setup | 22 - _includes/JB/sharing | 8 - _includes/JB/tags_list | 33 - _includes/footer.html | 170 + _includes/head.html | 45 + _includes/nav.html | 66 + _includes/themes/twitter/default.html | 68 - _includes/themes/twitter/page.html | 29 - _includes/themes/twitter/post.html | 53 - _includes/themes/twitter/settings.yml | 2 - _layouts/default.html | 28 +- _layouts/keynote.html | 258 + _layouts/page.html | 188 +- _layouts/post.html | 226 +- _plugins/debug.rb | 38 - _posts/2013-05-16-hello-blog.md | 17 - _posts/2013-05-17-linux.md | 2 +- _posts/2013-05-17-ubuntusublime-text-2-.md | 2 +- _posts/2013-05-19-javascriptmapreduce.md | 2 +- .../2013-06-08-program-install-on-ubuntu.md | 1 - _posts/2013-06-08-sublime-text-2.md | 2 +- _posts/2013-06-10-spree-install-guides.md | 2 +- _posts/2013-06-13-activesupport-.md | 2 +- _posts/2013-06-14-rubystringsymbol.md | 2 +- _posts/2013-06-15-rubymodule.md | 2 +- .../2013-06-15-rvm-install-for-multi-user.md | 2 +- _posts/2013-06-18-ruby-bits-.md | 2 +- _posts/2013-06-20-rubymonk.md | 2 +- _posts/2013-06-25-devise-.md | 2 +- _posts/2013-06-27-cancan-.md | 2 +- _posts/2013-07-11-javascript-iife.md | 2 +- .../2013-08-07-deploy-rails-project-to-vps.md | 2 +- ...2013-08-08-deploy-rails-project-to-vps-.md | 2 +- _posts/2013-08-22-emacscript-5array.md | 2 +- _posts/2013-08-23-javascriptarray.md | 2 +- _posts/2013-11-10--check.md | 2 +- _posts/2013-11-10--unrepeat.md | 2 +- _posts/2013-11-10-.md | 2 +- ...3-11-13-rotate-the-matrix-by-90-degrees.md | 2 +- ...13-11-13-two-words-is-or-not-a-anagrams.md | 2 +- ...2013-11-14-matrix-set-0-for-row-and-col.md | 2 +- _posts/2013-11-14-rotation.md | 2 +- ...-15-setup-rails-development-environment.md | 2 +- _posts/2013-11-21-use-css3-paint-triangle.md | 2 +- _posts/2013-11-22-paint-a-red-heart.md | 2 +- _posts/2013-11-26-insert-sort.md | 2 +- _posts/2014-03-21-javascript.md | 2 +- _posts/2014-03-23-learn-guides.md | 2 +- .../2014-03-24-Third-type-value-variables.md | 2 +- _posts/2014-03-25-mongodb-learn-notes.md | 2 +- ...014-04-16-linux---remote-copy-for-linux.md | 2 +- _posts/2014-04-23-ubuntu-install-deb-file.md | 2 +- ...014-05-05-git-project-change-remote-url.md | 2 +- _posts/2014-05-08-ubuntu-ip.md | 2 +- _posts/2014-06-19-rubyclassmodule.md | 2 +- _posts/2014-06-22-00-object-intro.md | 2 +- .../2014-06-22-01-more-objects-and-method.md | 2 +- _posts/2014-06-22-02-specify-method-sugar.md | 2 +- _posts/2014-06-22-1-string-basic.md | 2 +- _posts/2014-06-22-2-conditions-and-loops.md | 2 +- _posts/2014-06-22-3-array-in-ruby.md | 2 +- _posts/2014-06-22-4-ruby-hashes.md | 2 +- _posts/2014-06-22-5-class-and-ruby.md | 2 +- _posts/2014-06-22-6-ruby-method.md | 2 +- _posts/2014-06-22-7-lambdas-and-blocks.md | 2 +- _posts/2014-06-24-8-module-intro.md | 2 +- _posts/2014-06-24-9-io-tips-.md | 2 +- _posts/2014-06-25-10-rubymonk-primer-.md | 2 +- ...014-06-26-solid-object-oriented-design-.md | 2 +- ...2014-06-30-rails-41-spring-rspec-guard-.md | 2 +- ...-08-16-osx-sublime-text-3-install-ctags.md | 2 +- ...014-09-26-change-file-or-folder's-owner.md | 2 +- ...rubymotion-run-special-iphone-simulator.md | 2 +- _posts/2014-11-12-nix-shell-script-create.md | 2 +- _posts/2014-12-25-elasticsearch-ik-.md | 2 +- ...se-fig-docker-development-rails-project.md | 2 +- .../2015-01-08-foreman-with-unicorn-rails.md | 2 +- ...01-23-ubuntu-server-system-monitor-tool.md | 2 +- ...-02-11-backuprestore-elasticsearch-data.md | 26 +- _posts/2016-02-19-hard-things-read-note.md | 173 + about.html | 127 + archive.html | 10 - .../bootstrap/css/bootstrap.2.2.2.min.css | 782 -- .../img/glyphicons-halflings-white.png | Bin 8777 -> 0 bytes .../bootstrap/img/glyphicons-halflings.png | Bin 12799 -> 0 bytes assets/themes/twitter/css/pixyll.css | 517 - assets/themes/twitter/css/style.css | 106 - assets/themes/twitter/css/syntax.css | 60 - assets/themes/twitter/images/1.ico | Bin 16618 -> 0 bytes assets/themes/twitter/images/github.png | Bin 1714 -> 0 bytes assets/themes/twitter/images/wall.jpg | Bin 1245 -> 0 bytes atom.xml | 28 - baidu_verify_VQgnh4NKHl.html | 1 - categories.html | 22 - changelog.md | 70 - css/bootstrap.css | 6566 ++++++++++++ css/bootstrap.min.css | 5 + css/hux-blog.css | 953 ++ css/hux-blog.min.css | 1 + css/syntax.css | 84 + feed.xml | 30 + .../glyphicons-halflings-regular.eot | Bin .../glyphicons-halflings-regular.svg | 0 .../glyphicons-halflings-regular.ttf | Bin .../glyphicons-halflings-regular.woff | Bin .../glyphicons-halflings-regular.woff2 | Bin google99f17075c90b2ee0.html | 1 - img/404-bg.jpg | Bin 0 -> 173890 bytes img/about-bg.jpg | Bin 0 -> 211507 bytes img/avatar-hux.jpg | Bin 0 -> 37044 bytes img/avatar.png | Bin 0 -> 233804 bytes img/contact-bg.jpg | Bin 0 -> 290070 bytes img/favicon.ico | Bin 0 -> 318 bytes img/home-bg-o.jpg | Bin 0 -> 172779 bytes img/home-bg.jpg | Bin 0 -> 227512 bytes img/icon_wechat.png | Bin 0 -> 7490 bytes img/in-post/hard-things.jpg | Bin 0 -> 57681 bytes .../post-js-version/javascript-java.jpg | Bin 0 -> 89433 bytes .../keep-calm-and-learn-javascript.png | Bin 0 -> 26808 bytes img/post-bg-2015.jpg | Bin 0 -> 231616 bytes img/post-bg-js-module.jpg | Bin 0 -> 76251 bytes img/post-bg-js-version.jpg | Bin 0 -> 23746 bytes img/post-bg-unix-linux.jpg | Bin 0 -> 105796 bytes img/tag-bg.jpg | Bin 0 -> 88093 bytes index.html | 42 + index.md | 52 - js/bootstrap.js | 2306 +++++ js/bootstrap.min.js | 7 + js/hux-blog.js | 65 + js/hux-blog.min.js | 6 + js/jquery.js | 9205 +++++++++++++++++ js/jquery.min.js | 4 + js/jquery.tagcloud.js | 81 + less/hux-blog.less | 969 ++ less/mixins.less | 51 + less/sidebar.less | 58 + less/variables.less | 8 + mobile/ol3map/index.html | 21 - mobile/ol3map/js/bootstrap.min.js | 7 - mobile/ol3map/js/jquery-1.11.2.min.js | 4 - mobile/ol3map/js/map.js | 55 - mobile/ol3map/js/ol-v3.4.0.js | 963 -- mobile/ol3map/shanghai.json | 24 - mobile/ol3map/shenzhen.json | 1 - mobile/ol3map/stylesheets/bootstrap.min.css | 5 - mobile/ol3map/stylesheets/ol-v3.4.0.css | 1 - mobile/ol3map/stylesheets/samples.css | 106 - package.json | 22 + pages.html | 13 - rss.xml | 28 - sitemap.txt | 8 - tags.html | 76 +- 174 files changed, 22502 insertions(+), 4012 deletions(-) create mode 100644 .jekyll-metadata create mode 100644 CNAME create mode 100644 Gruntfile.js create mode 100644 LICENSE create mode 100644 README.zh.md delete mode 100644 Rakefile delete mode 100644 _includes/JB/analytics delete mode 100644 _includes/JB/analytics-providers/getclicky delete mode 100644 _includes/JB/analytics-providers/google delete mode 100644 _includes/JB/analytics-providers/mixpanel delete mode 100644 _includes/JB/categories_list delete mode 100644 _includes/JB/comments delete mode 100644 _includes/JB/comments-providers/disqus delete mode 100644 _includes/JB/comments-providers/facebook delete mode 100644 _includes/JB/comments-providers/intensedebate delete mode 100644 _includes/JB/comments-providers/livefyre delete mode 100644 _includes/JB/liquid_raw delete mode 100644 _includes/JB/pages_list delete mode 100644 _includes/JB/posts_collate delete mode 100644 _includes/JB/setup delete mode 100644 _includes/JB/sharing delete mode 100644 _includes/JB/tags_list create mode 100644 _includes/footer.html create mode 100644 _includes/head.html create mode 100644 _includes/nav.html delete mode 100644 _includes/themes/twitter/default.html delete mode 100644 _includes/themes/twitter/page.html delete mode 100644 _includes/themes/twitter/post.html delete mode 100644 _includes/themes/twitter/settings.yml create mode 100644 _layouts/keynote.html delete mode 100644 _plugins/debug.rb delete mode 100644 _posts/2013-05-16-hello-blog.md create mode 100644 _posts/2016-02-19-hard-things-read-note.md create mode 100644 about.html delete mode 100644 archive.html delete mode 100644 assets/themes/twitter/bootstrap/css/bootstrap.2.2.2.min.css delete mode 100644 assets/themes/twitter/bootstrap/img/glyphicons-halflings-white.png delete mode 100644 assets/themes/twitter/bootstrap/img/glyphicons-halflings.png delete mode 100644 assets/themes/twitter/css/pixyll.css delete mode 100644 assets/themes/twitter/css/style.css delete mode 100644 assets/themes/twitter/css/syntax.css delete mode 100644 assets/themes/twitter/images/1.ico delete mode 100644 assets/themes/twitter/images/github.png delete mode 100644 assets/themes/twitter/images/wall.jpg delete mode 100644 atom.xml delete mode 100644 baidu_verify_VQgnh4NKHl.html delete mode 100644 categories.html delete mode 100644 changelog.md create mode 100644 css/bootstrap.css create mode 100644 css/bootstrap.min.css create mode 100644 css/hux-blog.css create mode 100644 css/hux-blog.min.css create mode 100644 css/syntax.css create mode 100644 feed.xml rename {mobile/ol3map/fonts => fonts}/glyphicons-halflings-regular.eot (100%) rename {mobile/ol3map/fonts => fonts}/glyphicons-halflings-regular.svg (100%) rename {mobile/ol3map/fonts => fonts}/glyphicons-halflings-regular.ttf (100%) rename {mobile/ol3map/fonts => fonts}/glyphicons-halflings-regular.woff (100%) rename {mobile/ol3map/fonts => fonts}/glyphicons-halflings-regular.woff2 (100%) delete mode 100644 google99f17075c90b2ee0.html create mode 100644 img/404-bg.jpg create mode 100644 img/about-bg.jpg create mode 100644 img/avatar-hux.jpg create mode 100644 img/avatar.png create mode 100644 img/contact-bg.jpg create mode 100755 img/favicon.ico create mode 100644 img/home-bg-o.jpg create mode 100644 img/home-bg.jpg create mode 100644 img/icon_wechat.png create mode 100644 img/in-post/hard-things.jpg create mode 100644 img/in-post/post-js-version/javascript-java.jpg create mode 100644 img/in-post/post-js-version/keep-calm-and-learn-javascript.png create mode 100644 img/post-bg-2015.jpg create mode 100644 img/post-bg-js-module.jpg create mode 100644 img/post-bg-js-version.jpg create mode 100644 img/post-bg-unix-linux.jpg create mode 100644 img/tag-bg.jpg create mode 100644 index.html delete mode 100644 index.md create mode 100644 js/bootstrap.js create mode 100644 js/bootstrap.min.js create mode 100644 js/hux-blog.js create mode 100644 js/hux-blog.min.js create mode 100644 js/jquery.js create mode 100644 js/jquery.min.js create mode 100755 js/jquery.tagcloud.js create mode 100644 less/hux-blog.less create mode 100644 less/mixins.less create mode 100644 less/sidebar.less create mode 100644 less/variables.less delete mode 100644 mobile/ol3map/index.html delete mode 100644 mobile/ol3map/js/bootstrap.min.js delete mode 100644 mobile/ol3map/js/jquery-1.11.2.min.js delete mode 100644 mobile/ol3map/js/map.js delete mode 100644 mobile/ol3map/js/ol-v3.4.0.js delete mode 100644 mobile/ol3map/shanghai.json delete mode 100755 mobile/ol3map/shenzhen.json delete mode 100644 mobile/ol3map/stylesheets/bootstrap.min.css delete mode 100644 mobile/ol3map/stylesheets/ol-v3.4.0.css delete mode 100644 mobile/ol3map/stylesheets/samples.css create mode 100644 package.json delete mode 100644 pages.html delete mode 100644 rss.xml delete mode 100644 sitemap.txt diff --git a/.jekyll-metadata b/.jekyll-metadata new file mode 100644 index 0000000000000000000000000000000000000000..b861679a064bd5703f9bcc790036253053763bfd GIT binary patch literal 44897 zcmeHQO>g8#84fFyWESl|U@y6FdiyKg`DB67Bm<3RhOm?6Yk+LEU2RulySy&Dlg?g7 zhyxN@Ef=n6v=SEtLMx7l3qOD>*OkyLE3M!+@Rr@(>GULVSC=zmvn7q9M9Q?^R6Ty` z{dnHDzP$SWmwwe<`(FJWK_gN3*cl^%<0th8ltjTEi|XfY;;|rP!7!;gEOwJ#jq&)8*Zz!)~&3=McYt<3G!9K3!Tm zc($^0=bQ($yS94o@ge@k{hhDyeqYd-z4kQhuHCU|DCB>9@_Kje+sdYSWXKaVPMTPA zW8afc=&pT7`GZ(sd5KL$-KE5y`XqIeCZ80L!PEzRcX5;YoX0fM`mFIf*|bj*Z+fZJ z|G@EQU0U;56znd)@vjsC&;GEoiwGI-{_g7RzAqKGT~`?KJT+qJpZP|pFT|BQeT5D4 zFGO)5dC6vsF)@oTEi;akUzrz}D(NLboQS07Atymh&thnSWGywXj&|;`+ z=7gBM3AajBKhwp-HXM@y5mv;)*e78`?Zl$FXn1DOpyn^U95h&3XxMMq@Tbob%@ zHBsZ7JA^d!b=Ai{=-%6Z^jQDFcU2$!_Ws?yhx@g2_j*@&{y+Pn>eERSGs~k#%tsy) z^}A6-hP5zouGxTpq)DFN{5^*eaRYv!X$g^*9JxfeM}B#4YnjP|C6I zWfOcB6k^8yA}ir0XVCMwQ-}p!EencThkJ`yA%;Or&I(zDC#uiy^8i&cjyDWlX7NCP zOT0eHcpL!{brO$6HOgacnBIn6VsKs9KmY4<8+OHUUwgfjN&s* z!NEdnFfySK1C*7Xat-7T9Gz0jCGibtoSzd87C{0FK+4tXE{SZ2U3nJYup*yla@r5` zUkzKw7-<{3Cw37Fp$tV-Bm*{}L^rD4<}bM^*G@0B`lJ%s%hLJl#Q>vr zpS%*ho&?V{`P|s2b-mn0x%N5(gk}Q-%H=7HmC{bauvyB$Vbmd4F$JzJFJL1e#?fp* zF~=VAD9-JuIWWAS*mF5S)U9^Z{6sYro8^TzL`iRmbq*Q64*eeY3@22R6ApEu&`F^% z3Nv#$>*tPNFrh*@Lj|hk5NttX6HkNC<3orD^Mstma7V(TVUm}8@&uu#@tUOG0mpw$BE6DynC1D&)B(}WS#3?uYh2*kqrlnY^yFg>WT zVmSq6+1xZMpeKn{Nw8dMnT$e3kA=rN-ogj~Nf6PHqL9;+9I|Px6(a#?;06&DP_>_=(59xY>c2NgcqoW z&tn9Gf^t^0H5AZoXsiRC5f|;!1_ae~6qEYw zdPFeG0HK=a#k*RWsFWI7n0yLs7NYl;`eNlxr}(nmvxfcSz~<0a{7$g(PSI8Mwd*W(`d4ftg5bpo(vMB$u?{Q;}Ekj zf83*CgL1Ngp416J(2>&_q??F}rxPq)GoMDe<9iGm%83R&0Ry681BLM(v&Ypb9x?2t z!mbItLx4H?(*O-F%83h&Zrs#`Tt|vXhrhKk5se%XI1tGS1vrVk6wO4K)r>HYwUSO- zQW?p`85XB{9v&MI)3X@XCu%qgZ|E^mMn(Jg^-hv)d6JCeZ&DB`=Q{McXVd6wIOE|o z$e%H9PLgt-B=2ca2I3-{F^@88tYD$v8Dy1i;sFa?9#9YrFCri@H`VTnGKZG_L5_H6 zfxPVzix{2q9tQgin7U=Spu)zvs_>&#^tOiJDe|m zexQ!JDW_56eA(3POmNOapE+P-HXCym(}O@RO{zB0Nj0Mr4RvJ(l`Yw$h2w|=IK?C{ z;3dKq$6KdUa2QZj6BH+!{BhB=g<~M_erphTDIWD@zb8Yd6Q|ne4;M3jMmhZqjdTVQ z28t}3D6h0m61+fFAQtG1*I|>G) Xk&t1-;9-wN^>a7D_UVwl0zCW=ZKd`^ literal 0 HcmV?d00001 diff --git a/404.html b/404.html index 6904bcd..0fdcb6e 100644 --- a/404.html +++ b/404.html @@ -1 +1,25 @@ -Sorry this page does not exist =( +--- +layout: default +description: "你来到了没有知识的荒原 :(" +header-img: "img/404-bg.jpg" +permalink: /404.html +--- + + + +
+
+
+
+
+

404

+ {{ page.description }} +
+
+
+
+
+ + diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..de54ac6 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +example.com diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..92a7adf --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,73 @@ +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + uglify: { + main: { + src: 'js/<%= pkg.name %>.js', + dest: 'js/<%= pkg.name %>.min.js' + } + }, + less: { + expanded: { + options: { + paths: ["css"] + }, + files: { + "css/<%= pkg.name %>.css": "less/<%= pkg.name %>.less" + } + }, + minified: { + options: { + paths: ["css"], + cleancss: true + }, + files: { + "css/<%= pkg.name %>.min.css": "less/<%= pkg.name %>.less" + } + } + }, + banner: '/*!\n' + + ' * <%= pkg.title %> v<%= pkg.version %> (<%= pkg.homepage %>)\n' + + ' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + + ' */\n', + usebanner: { + dist: { + options: { + position: 'top', + banner: '<%= banner %>' + }, + files: { + src: ['css/<%= pkg.name %>.css', 'css/<%= pkg.name %>.min.css', 'js/<%= pkg.name %>.min.js'] + } + } + }, + watch: { + scripts: { + files: ['js/<%= pkg.name %>.js'], + tasks: ['uglify'], + options: { + spawn: false, + }, + }, + less: { + files: ['less/*.less'], + tasks: ['less'], + options: { + spawn: false, + } + }, + }, + }); + + // Load the plugins. + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-less'); + grunt.loadNpmTasks('grunt-banner'); + grunt.loadNpmTasks('grunt-contrib-watch'); + + // Default task(s). + grunt.registerTask('default', ['uglify', 'less', 'usebanner']); + +}; diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..610cecd --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2013-2015 Iron Summit Media Strategies, LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/README.md b/README.md index 4ec78ed..1d7e672 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,9 @@ -# Jekyll-Bootstrap +# HuxBlog Boilerplate -The quickest way to start and publish your Jekyll powered blog. 100% compatible with GitHub pages +##### This is the boilerplate of [Hux Blog](https://github.com/Huxpro/huxpro.github.io), all documents is over there! -## Usage +#### [View Boilerplate →](http://huangxuan.me/huxblog-boilerplate/) -For all usage and documentation please see: +#### [View Live Hux Blog →](http://huangxuan.me) -## Version - -0.3.0 - stable and versioned using [semantic versioning](http://semver.org/). - -**NOTE:** 0.3.0 introduces a new theme which is not backwards compatible in the sense it won't _look_ like the old version. -However, the actual API has not changed at all. -You might want to run 0.3.0 in a branch to make sure you are ok with the theme design changes. - -## Contributing - -This repository tracks 2 projects: - -- **Jekyll-Bootstrap Framework.** - The framework for which users should clone and build their blog on top of is available in the master branch. - - To contribute to the framework please make sure to checkout your branch based on `jb-development`!! - This is very important as it allows me to accept your pull request without having to publish a public version release. - - Small, atomic Features, bugs, etc. - Use the `jb-development` branch but note it will likely change fast as pull requests are accepted. - Please rebase as often as possible when working. - Work on small, atomic features/bugs to avoid upstream commits affecting/breaking your development work. - - For Big Features or major API extensions/edits: - This is the one case where I'll accept pull-requests based off the master branch. - This allows you to work in isolation but it means I'll have to manually merge your work into the next public release. - Translation : it might take a bit longer so please be patient! (but sincerely thank you). - -- **Jekyll-Bootstrap Documentation Website.** - The documentation website at is maintained in the gh-pages branch. - Please fork and contribute documentation additions to this branch only. - -The master and gh-pages branch do not share the same ancestry. Please treat them as completely separate git repositories! - - -## License - -[MIT](http://opensource.org/licenses/MIT) +## If you like Hux Blog, Please star [huxpro.github.io repo](https://github.com/Huxpro/huxpro.github.io) instead of this! Thank you! \ No newline at end of file diff --git a/README.zh.md b/README.zh.md new file mode 100644 index 0000000..25b228d --- /dev/null +++ b/README.zh.md @@ -0,0 +1,234 @@ +# Hux blog 模板 + +### [我的博客在这里](http://huxpro.github.io) + +### [模板在这里](http://huangxuan.me/huxblog-boilerplate/) + +我的博客仓库——`huxpro.github.io`,是经常修改的,而且还会有人乱提交代码,因此给大家做了一个稳定版的模板。大家可以直接fork模板——`huxblog-boilerplate`,要改的地方我都说明了。或者可以直接下载zip到本地自己去修改。 + +## 各版本特性 + +##### New Feature (V1.5.2) + +* 当你fork了我的仓库之后,还要删掉里面的关于我的文档是不是感到略烦躁呢?**Boilerplate** 模板将帮助你快速开始,方便合并与更新。 +* `-apple-system`被添加到了字体规则里面了,这套字体格式能将iOS9默认的新字体**San Francisco**表现的非常漂亮。 +* 解决了代码过长自动换行的bug,替换为横向滚动条。详情请见[issue#15](https://github.com/Huxpro/huxpro.github.io/issues/15) + +###### 其他历史版本个人觉得没有必要了解,看看英文就行了。 + + + +## 支持 + +* 你可以自由的fork。如果你能将我的信息和github的地址放在你的页面底部做成链接,我将非常感谢你。 +* 如果你喜欢我的这个博客模板,请在`huxpro.github.io`这个repository点个赞——右上角**star**一下。 + +## 说明文档 + +* 开始 + * [环境要求](#environment) + * [开始](#get-started) + * [写一篇博文](#write-posts) +* 各组成部分 + * [侧边栏](#sidebar) + * [mini-about-me](#mini-about-me) + * [标签云](#featured-tags) + * [好友链接](#friends) + * [HTML5演示文档布局](#keynote-layout) +* 评论与 Google/Baidu Analytics + * [评论](#comment) + * [网站分析](#analytics) +* 高级部分 + * [自定义](#customization) + * [标题底图](#header-image) + * [搜索展示标题-头文件](#seo-title) + +#### Environment + +如果你安装了jekyll,那你只需要在命令行输入`jekyll serve`就能在本地浏览器预览主题。你还可以输入`jekyll serve --watch`,这样可以边修改边自动运行修改后的文件。 + +经 [@BrucZhaoR](https://github.com/BruceZhaoR)的测试,好像两个命令都是可以的自动运行修改后的文件的,刷新后可以实时预览。官方文件是建议安装bundler,这样你在本地的效果就跟在github上面是一样的。详情请见这里:https://help.github.com/articles/using-jekyll-with-pages/#installing-jekyll + + +#### Get Started + +你可以通用修改 `_config.yml`文件来轻松的开始搭建自己的博客: + +``` +# Site settings +title: Hux Blog # 你的博客网站标题 +SEOTitle: Hux Blog # 在后面会详细谈到 +description: "Cool Blog" # 随便说点,描述一下 + +# SNS settings +github_username: huxpro # 你的github账号 +weibo_username: huxpro # 你的微博账号,底部链接会自动更新的。 + +# Build settings +# paginate: 10 # 一页你准备放几篇文章 +``` + +Jekyll官方网站还有很多的参数可以调,比如设置文章的链接形式...网址在这里:[Jekyll - Official Site](http://jekyllrb.com/) 中文版的在这里:[Jekyll中文](http://jekyllcn.com/). + +#### write-posts + +要发表的文章一般以markdown的格式放在这里`_posts/`,你只要看看这篇模板里的文章你就立刻明白该如何设置。 + +yaml 头文件长这样: + +``` +--- +layout: post +title: "Hello 2015" +subtitle: "Hello World, Hello Blog" +date: 2015-01-29 12:00:00 +author: "Hux" +header-img: "img/post-bg-2015.jpg" +tags: + - Life +--- + +``` + +#### SideBar + +长这样: +![](http://huangxuan.me/img/blog-sidebar.jpg) + +设置是在 `_config.yml`文件里面的`Sidebar settings`那块。 +``` +# Sidebar settings +sidebar: true #添加侧边栏 +sidebar-about-description: "简单的描述一下你自己" +sidebar-avatar: /img/avatar-hux.jpg #你的大头贴,请使用绝对地址. +``` + +侧边栏是响应式布局的,当屏幕尺寸小于992px的时候,侧边栏就会移动到底部。具体请见bootstrap栅格系统 + + +#### Mini About Me + +Mini-About-Me 这个模块将在你的头像下面,展示你所有的社交账号。这个也是响应式布局,当屏幕变小时候,会将其移动到页面底部,只不过会稍微有点小变化,具体请看代码。 + +#### Featured Tags + +看到这个网站 [Medium](http://medium.com) 的标签云非常的炫酷,所有我在将他加了进来。 +这个模块现在是独立的,可以呈现在所有页面,包括主页和发表的每一篇文章标题的头上。 + +``` +# Featured Tags +featured-tags: true +featured-condition-size: 1 # A tag will be featured if the size of it is more than this condition value +``` + +唯一需要注意的是`featured-condition-size`: A tag will be featured if the size of it is more than this condition value. (也不知道Hux是想表达什么意思,请作者解答) + +内部有一个条件模板 `{% if tag[1].size > {{site.featured-condition-size}} %}` 是用来做筛选过滤的. + + +#### Friends + +好友链接部分。这会在全部页面显示。 + +设置是在 `_config.yml`文件里面的`Friends`那块,自己加吧。 + +``` +# Friends +friends: [ + { + title: "Foo Blog", + href: "http://foo.github.io/" + }, + { + title: "Bar Blog", + href: "http://bar.github.io" + } +] +``` + + +#### Keynote Layout + +HTML5幻灯片的排版: + +![](http://huangxuan.me/img/blog-keynote.jpg) + +这部分是用于占用html格式的幻灯片的,一般用到的是 Reveal.js, Impress.js, Slides, Prezi 等等.我认为一个现代化的博客怎么能少了放html幻灯的功能呢~ + +其主要原理是添加一个 `iframe`,在里面加入外部链接。你可以直接写到头文件里面去,详情请见下面的yaml头文件的写法。 + +``` +--- +layout: keynote +iframe: "http://huangxuan.me/js-module-7day/" +--- +``` + +iframe在不同的设备中,将会自动的调整大小。保留内边距是为了让手机用户可以向下滑动,以及添加更多的内容。 + + +#### Comment + +博客不仅的多说[Duoshuo](http://duoshuo.com)评论系统,也支持disqus[Disqus](http://disqus.com)评论系统。 + +disqus国际比较流行,界面也很大气、简介,如果有人评论,还能实时通知,直接回复通知的邮件就行了。缺点是评论必须要去注册一个disqus账号,分享一般只有Facebook和Twitter,另外在墙内加载速度略慢了一点。想要知道长啥样,可以看以前的版本点[这里](http://brucezhaor.github.io/about.html) 最下面就可以看到。 + +多说国内主流社交软件都有分享按钮,登陆方便,比较好管理,就是界面丑了一点。当然你是可以自定义界面的css的,详情请看多说开发者文档。 + +**首先**,你需要去注册一个账号,不管是disqus还是多说的。**不要直接使用我的啊!** + +**其次**,你只需要在下面的yaml头文件中设置一下就可以了。 + +``` +duoshuo_username: _你的用户名_ +# 或者 +disqus_username: _你的用户名_ +``` + +**最后**多说是支持分享的,如果你不想分享,请这样设置:`duoshuo_share: false`。你可以同时使用两个评论系统,不过个人感觉怪怪的。 + +#### Analytics + +网站分析,现在支持百度统计和Google Analytics。需要去官方网站注册一下,然后将返回的code贴在下面: + +``` +# Baidu Analytics +ba_track_id: 4cc1f2d8f3067386cc5cdb626a202900 + +# Google Analytics +ga_track_id: 'UA-49627206-1' # Format: UA-xxxxxx-xx +ga_domain: huangxuan.me +``` + +#### Customization + +如果你喜欢折腾,你可以去自定义我的这个模板的code,[Grunt](gruntjs.com)的环境已经搭好了。(非常感谢Clean Blog这个模板) + +There are a number of tasks it performs like minification of the JavaScript, compiling of the LESS files, adding banners to keep the Apache 2.0 license intact, and watching for changes. Run the grunt default task by entering `grunt ` into your command line which will build the files. You can use `grunt watch` if you are working on the JavaScript or the LESS. + +**Try to understand code in `_include/` and `_layouts/`, then you can modify Jekyll [Liquid](https://github.com/Shopify/liquid/wiki) template directly to do more creative customization.** + +#### Header Image + +标题底图是可以自己选的,看看几篇示例post你就知道如何设置了,详情请见: + [issue #6 ](https://github.com/Huxpro/huxpro.github.io/issues/6) asked, **how to make it looks great?** + +标题底图的选取完全是看个人的审美了,我也帮不了你。每一篇文章可以有不同的底图,你想放什么就放什么,最后宽度要够,大小不要太大,否则加载慢啊。 + +但是需要注意的是本模板的标题是**白色**的,所以背景色要设置为**灰色**或者**黑色**,总之深色系就对了。 + +#### SEO Title + +我的博客标题是 **“Hux Blog”** 但是我想要在搜索的时候显示 **“黄玄的博客 | Hux Blog”** ,这个就需要SEO Title来定义了。 + +其实这个SEO Title就是定义了标题这个里面的东西和多说分享的标题,你可以自行修改的。 + +## 致谢 + +1. 这个模板是从这里[IronSummitMedia/startbootstrap-clean-blog-jekyll](https://github.com/IronSummitMedia/startbootstrap-clean-blog-jekyll) forked 的。 感谢这个作者 +2. 感谢[@BrucZhaoR](https://github.com/BruceZhaoR)的中文翻译 + +3. 感谢 Jekyll、Github Pages 和 Bootstrap! + + + diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 18bc7c5..0000000 --- a/Rakefile +++ /dev/null @@ -1,309 +0,0 @@ -require "rubygems" -require 'rake' -require 'yaml' -require 'time' - -SOURCE = "." -CONFIG = { - 'version' => "0.3.0", - 'themes' => File.join(SOURCE, "_includes", "themes"), - 'layouts' => File.join(SOURCE, "_layouts"), - 'posts' => File.join(SOURCE, "_posts"), - 'post_ext' => "md", - 'theme_package_version' => "0.1.0" -} - -# Path configuration helper -module JB - class Path - SOURCE = "." - Paths = { - :layouts => "_layouts", - :themes => "_includes/themes", - :theme_assets => "assets/themes", - :theme_packages => "_theme_packages", - :posts => "_posts" - } - - def self.base - SOURCE - end - - # build a path relative to configured path settings. - def self.build(path, opts = {}) - opts[:root] ||= SOURCE - path = "#{opts[:root]}/#{Paths[path.to_sym]}/#{opts[:node]}".split("/") - path.compact! - File.__send__ :join, path - end - - end #Path -end #JB - -# Usage: rake post title="A Title" [date="2012-02-09"] [tags=[tag1, tag2]] -desc "Begin a new post in #{CONFIG['posts']}" -task :post do - abort("rake aborted: '#{CONFIG['posts']}' directory not found.") unless FileTest.directory?(CONFIG['posts']) - title = ENV["title"] || "new-post" - tags = ENV["tags"] || "[]" - slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '') - begin - date = (ENV['date'] ? Time.parse(ENV['date']) : Time.now).strftime('%Y-%m-%d') - rescue Exception => e - puts "Error - date format must be YYYY-MM-DD, please check you typed it correctly!" - exit -1 - end - filename = File.join(CONFIG['posts'], "#{date}-#{slug}.#{CONFIG['post_ext']}") - if File.exist?(filename) - abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' - end - - puts "Creating new post: #{filename}" - open(filename, 'w') do |post| - post.puts "---" - post.puts "layout: post" - post.puts "title: \"#{title.gsub(/-/,' ')}\"" - post.puts 'description: ""' - post.puts "category: " - post.puts "tags: []" - post.puts "---" - post.puts "{% include JB/setup %}" - end -end # task :post - -# Usage: rake page name="about.html" -# You can also specify a sub-directory path. -# If you don't specify a file extention we create an index.html at the path specified -desc "Create a new page." -task :page do - name = ENV["name"] || "new-page.md" - filename = File.join(SOURCE, "#{name}") - filename = File.join(filename, "index.html") if File.extname(filename) == "" - title = File.basename(filename, File.extname(filename)).gsub(/[\W\_]/, " ").gsub(/\b\w/){$&.upcase} - if File.exist?(filename) - abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' - end - - mkdir_p File.dirname(filename) - puts "Creating new page: #{filename}" - open(filename, 'w') do |post| - post.puts "---" - post.puts "layout: page" - post.puts "title: \"#{title}\"" - post.puts 'description: ""' - post.puts "---" - post.puts "{% include JB/setup %}" - end -end # task :page - -desc "Launch preview environment" -task :preview do - system "jekyll --auto --server" -end # task :preview - -# Public: Alias - Maintains backwards compatability for theme switching. -task :switch_theme => "theme:switch" - -namespace :theme do - - # Public: Switch from one theme to another for your blog. - # - # name - String, Required. name of the theme you want to switch to. - # The the theme must be installed into your JB framework. - # - # Examples - # - # rake theme:switch name="the-program" - # - # Returns Success/failure messages. - desc "Switch between Jekyll-bootstrap themes." - task :switch do - theme_name = ENV["name"].to_s - theme_path = File.join(CONFIG['themes'], theme_name) - settings_file = File.join(theme_path, "settings.yml") - non_layout_files = ["settings.yml"] - - abort("rake aborted: name cannot be blank") if theme_name.empty? - abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path) - abort("rake aborted: '#{CONFIG['layouts']}' directory not found.") unless FileTest.directory?(CONFIG['layouts']) - - Dir.glob("#{theme_path}/*") do |filename| - next if non_layout_files.include?(File.basename(filename).downcase) - puts "Generating '#{theme_name}' layout: #{File.basename(filename)}" - - open(File.join(CONFIG['layouts'], File.basename(filename)), 'w') do |page| - if File.basename(filename, ".html").downcase == "default" - page.puts "---" - page.puts File.read(settings_file) if File.exist?(settings_file) - page.puts "---" - else - page.puts "---" - page.puts "layout: default" - page.puts "---" - end - page.puts "{% include JB/setup %}" - page.puts "{% include themes/#{theme_name}/#{File.basename(filename)} %}" - end - end - - puts "=> Theme successfully switched!" - puts "=> Reload your web-page to check it out =)" - end # task :switch - - # Public: Install a theme using the theme packager. - # Version 0.1.0 simple 1:1 file matching. - # - # git - String, Optional path to the git repository of the theme to be installed. - # name - String, Optional name of the theme you want to install. - # Passing name requires that the theme package already exist. - # - # Examples - # - # rake theme:install git="https://github.com/jekyllbootstrap/theme-twitter.git" - # rake theme:install name="cool-theme" - # - # Returns Success/failure messages. - desc "Install theme" - task :install do - if ENV["git"] - manifest = theme_from_git_url(ENV["git"]) - name = manifest["name"] - else - name = ENV["name"].to_s.downcase - end - - packaged_theme_path = JB::Path.build(:theme_packages, :node => name) - - abort("rake aborted! - => ERROR: 'name' cannot be blank") if name.empty? - abort("rake aborted! - => ERROR: '#{packaged_theme_path}' directory not found. - => Installable themes can be added via git. You can find some here: http://github.com/jekyllbootstrap - => To download+install run: `rake theme:install git='[PUBLIC-CLONE-URL]'` - => example : rake theme:install git='git@github.com:jekyllbootstrap/theme-the-program.git' - ") unless FileTest.directory?(packaged_theme_path) - - manifest = verify_manifest(packaged_theme_path) - - # Get relative paths to packaged theme files - # Exclude directories as they'll be recursively created. Exclude meta-data files. - packaged_theme_files = [] - FileUtils.cd(packaged_theme_path) { - Dir.glob("**/*.*") { |f| - next if ( FileTest.directory?(f) || f =~ /^(manifest|readme|packager)/i ) - packaged_theme_files << f - } - } - - # Mirror each file into the framework making sure to prompt if already exists. - packaged_theme_files.each do |filename| - file_install_path = File.join(JB::Path.base, filename) - if File.exist? file_install_path and ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' - next - else - mkdir_p File.dirname(file_install_path) - cp_r File.join(packaged_theme_path, filename), file_install_path - end - end - - puts "=> #{name} theme has been installed!" - puts "=> ---" - if ask("=> Want to switch themes now?", ['y', 'n']) == 'y' - system("rake switch_theme name='#{name}'") - end - end - - # Public: Package a theme using the theme packager. - # The theme must be structured using valid JB API. - # In other words packaging is essentially the reverse of installing. - # - # name - String, Required name of the theme you want to package. - # - # Examples - # - # rake theme:package name="twitter" - # - # Returns Success/failure messages. - desc "Package theme" - task :package do - name = ENV["name"].to_s.downcase - theme_path = JB::Path.build(:themes, :node => name) - asset_path = JB::Path.build(:theme_assets, :node => name) - - abort("rake aborted: name cannot be blank") if name.empty? - abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path) - abort("rake aborted: '#{asset_path}' directory not found.") unless FileTest.directory?(asset_path) - - ## Mirror theme's template directory (_includes) - packaged_theme_path = JB::Path.build(:themes, :root => JB::Path.build(:theme_packages, :node => name)) - mkdir_p packaged_theme_path - cp_r theme_path, packaged_theme_path - - ## Mirror theme's asset directory - packaged_theme_assets_path = JB::Path.build(:theme_assets, :root => JB::Path.build(:theme_packages, :node => name)) - mkdir_p packaged_theme_assets_path - cp_r asset_path, packaged_theme_assets_path - - ## Log packager version - packager = {"packager" => {"version" => CONFIG["theme_package_version"].to_s } } - open(JB::Path.build(:theme_packages, :node => "#{name}/packager.yml"), "w") do |page| - page.puts packager.to_yaml - end - - puts "=> '#{name}' theme is packaged and available at: #{JB::Path.build(:theme_packages, :node => name)}" - end - -end # end namespace :theme - -# Internal: Download and process a theme from a git url. -# Notice we don't know the name of the theme until we look it up in the manifest. -# So we'll have to change the folder name once we get the name. -# -# url - String, Required url to git repository. -# -# Returns theme manifest hash -def theme_from_git_url(url) - tmp_path = JB::Path.build(:theme_packages, :node => "_tmp") - abort("rake aborted: system call to git clone failed") if !system("git clone #{url} #{tmp_path}") - manifest = verify_manifest(tmp_path) - new_path = JB::Path.build(:theme_packages, :node => manifest["name"]) - if File.exist?(new_path) && ask("=> #{new_path} theme package already exists. Override?", ['y', 'n']) == 'n' - remove_dir(tmp_path) - abort("rake aborted: '#{manifest["name"]}' already exists as theme package.") - end - - remove_dir(new_path) if File.exist?(new_path) - mv(tmp_path, new_path) - manifest -end - -# Internal: Process theme package manifest file. -# -# theme_path - String, Required. File path to theme package. -# -# Returns theme manifest hash -def verify_manifest(theme_path) - manifest_path = File.join(theme_path, "manifest.yml") - manifest_file = File.open( manifest_path ) - abort("rake aborted: repo must contain valid manifest.yml") unless File.exist? manifest_file - manifest = YAML.load( manifest_file ) - manifest_file.close - manifest -end - -def ask(message, valid_options) - if valid_options - answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer) - else - answer = get_stdin(message) - end - answer -end - -def get_stdin(message) - print message - STDIN.gets.chomp -end - -#Load custom rake scripts -Dir['_rake/*.rake'].each { |r| load r } diff --git a/_config.yml b/_config.yml index c380497..f438e64 100644 --- a/_config.yml +++ b/_config.yml @@ -1,131 +1,93 @@ -# This is the default format. -# For more see: https://github.com/mojombo/jekyll/wiki/Permalinks -permalink: /:categories/:year/:month/:day/:title - -exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md"] -auto: true - -# Themes are encouraged to use these universal variables -# so be sure to set them if your theme uses them. -# -title : 竹林居 -tagline: Site Tagline -author : - name : zhulinpinyu - email : mulixiang199016@gmail.com - github : zhulinpinyu - twitter : huanyizizhen - -# The production_url is only used when full-domain names are needed -# such as sitemap.txt -# Most places will/should use BASE_PATH to make the urls -# -# If you have set a CNAME (pages.github.com) set your custom domain here. -# Else if you are pushing to username.github.io, replace with your username. -# Finally if you are pushing to a GitHub project page, include the project name at the end. -# -production_url : http://zhulinpinyu.github.io - -# All Jekyll-Bootstrap specific configurations are namespaced into this hash -# -JB : - version : 0.3.0 - - # All links will be namespaced by BASE_PATH if defined. - # Links in your website should always be prefixed with {{BASE_PATH}} - # however this value will be dynamically changed depending on your deployment situation. - # - # CNAME (http://yourcustomdomain.com) - # DO NOT SET BASE_PATH - # (urls will be prefixed with "/" and work relatively) - # - # GitHub Pages (http://username.github.io) - # DO NOT SET BASE_PATH - # (urls will be prefixed with "/" and work relatively) - # - # GitHub Project Pages (http://username.github.io/project-name) - # - # A GitHub Project site exists in the `gh-pages` branch of one of your repositories. - # REQUIRED! Set BASE_PATH to: http://username.github.io/project-name - # - # CAUTION: - # - When in Localhost, your site will run from root "/" regardless of BASE_PATH - # - Only the following values are falsy: ["", null, false] - # - When setting BASE_PATH it must be a valid url. - # This means always setting the protocol (http|https) or prefixing with "/" - BASE_PATH : false - - # By default, the asset_path is automatically defined relative to BASE_PATH plus the enabled theme. - # ex: [BASE_PATH]/assets/themes/[THEME-NAME] - # - # Override this by defining an absolute path to assets here. - # ex: - # http://s3.amazonaws.com/yoursite/themes/watermelon - # /assets - # - ASSET_PATH : false - - # These paths are to the main pages Jekyll-Bootstrap ships with. - # Some JB helpers refer to these paths; change them here if needed. - # - archive_path: /archive.html - categories_path : /categories.html - tags_path : /tags.html - atom_path : /atom.xml - rss_path : /rss.xml - - # Settings for comments helper - # Set 'provider' to the comment provider you want to use. - # Set 'provider' to false to turn commenting off globally. - # - comments : - provider : disqus - disqus : - short_name : jekyllbootstrap - livefyre : - site_id : 123 - intensedebate : - account : 123abc - facebook : - appid : 123 - num_posts: 5 - width: 580 - colorscheme: light - - # Settings for analytics helper - # Set 'provider' to the analytics provider you want to use. - # Set 'provider' to false to turn analytics off globally. - # - analytics : - provider : google - google : - tracking_id : 'UA-123-12' - getclicky : - site_id : - mixpanel : - token : '_MIXPANEL_TOKEN_' - - # Settings for sharing helper. - # Sharing is for things like tweet, plusone, like, reddit buttons etc. - # Set 'provider' to the sharing provider you want to use. - # Set 'provider' to false to turn sharing off globally. - # - sharing : - provider : false - - # Settings for all other include helpers can be defined by creating - # a hash with key named for the given helper. ex: - # - # pages_list : - # provider : "custom" - # - # Setting any helper's provider to 'custom' will bypass the helper code - # and include your custom code. Your custom file must be defined at: - # ./_includes/custom/[HELPER] - # where [HELPER] is the name of the helper you are overriding. - - -markdown: redcarpet - -redcarpet: - extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", "strikethrough", "superscript", "with_toc_data"] \ No newline at end of file +# Site settings +title: 幻刈紫真 +SEOTitle: 幻刈紫真|我的部落格 +header-img: img/home-bg.jpg +email: huanyizizhen@gmail.com +description: "" +keyword: "" +url: "http://zhulinpinyu.github.io/" # your host, for absolute URL +baseurl: "" # for example, '/blog' if your blog hosted on 'host/blog' + + + +# SNS settings +RSS: false +weibo_username: zhulinpinyu +#zhihu_username: huxpro +github_username: zhulinpinyu +twitter_username: zhulinpinyu +facebook_username: zhulinpinyu + + + +# Build settings +highlighter: rouge +permalink: pretty +paginate: 3 +exclude: ["less","node_modules","Gruntfile.js","package.json","README.md"] +anchorjs: true # if you want to customize anchor. check out line:181 of `post.html` +gems: [jekyll-paginate] + + +# Markdown settings +# replace redcarpet to kramdown, +# although redcarpet can auto highlight code, the lack of header-id make the catalog impossible, so I switch to kramdown +# document: http://jekyllrb.com/docs/configuration/#kramdown +markdown: kramdown +kramdown: + input: GFM # use Github Flavored Markdown !important + + + +# Disqus settings +#disqus_username: _your_disqus_short_name_ + +# Duoshuo settings +duoshuo_username: +# Share component is depend on Comment so we can NOT use share only. +duoshuo_share: false # set to false if you want to use Comment without Sharing + + + + +# Analytics settings +# Baidu Analytics +ba_track_id: 4cc1f2d8f3067386cc5cdb626a202900 +# Google Analytics +ga_track_id: 'UA-49627206-1' # Format: UA-xxxxxx-xx +ga_domain: huangxuan.me + + + +# Sidebar settings +sidebar: true # whether or not using Sidebar. +sidebar-about-description: "写写代码,也想摆弄摄像,同时也在入门设计" +sidebar-avatar: /img/avatar.png # use absolute URL, seeing it's used in both `/` and `/about/` + + + +# Featured Tags +featured-tags: true # whether or not using Feature-Tags +featured-condition-size: 1 # A tag will be featured if the size of it is more than this condition value + + + +# Friends +friends: [ + { + title: "Hux Blog", + href: "http://huangxuan.me" + },{ + title: "Foo", + href: "#" + },{ + title: "Bar", + href: "#" + },{ + title: "Example Friends", + href: "#" + },{ + title: "It helps SEO", + href: "#" + } +] diff --git a/_includes/JB/analytics b/_includes/JB/analytics deleted file mode 100644 index 4b04ec9..0000000 --- a/_includes/JB/analytics +++ /dev/null @@ -1,14 +0,0 @@ -{% if site.safe and site.JB.analytics.provider and page.JB.analytics != false %} - -{% case site.JB.analytics.provider %} -{% when "google" %} - {% include JB/analytics-providers/google %} -{% when "getclicky" %} - {% include JB/analytics-providers/getclicky %} -{% when "mixpanel" %} - {% include JB/analytics-providers/mixpanel %} -{% when "custom" %} - {% include custom/analytics %} -{% endcase %} - -{% endif %} \ No newline at end of file diff --git a/_includes/JB/analytics-providers/getclicky b/_includes/JB/analytics-providers/getclicky deleted file mode 100644 index e9462f4..0000000 --- a/_includes/JB/analytics-providers/getclicky +++ /dev/null @@ -1,12 +0,0 @@ - - diff --git a/_includes/JB/analytics-providers/google b/_includes/JB/analytics-providers/google deleted file mode 100644 index 9014866..0000000 --- a/_includes/JB/analytics-providers/google +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/_includes/JB/analytics-providers/mixpanel b/_includes/JB/analytics-providers/mixpanel deleted file mode 100644 index 4406eb0..0000000 --- a/_includes/JB/analytics-providers/mixpanel +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/_includes/JB/categories_list b/_includes/JB/categories_list deleted file mode 100644 index 83be2e2..0000000 --- a/_includes/JB/categories_list +++ /dev/null @@ -1,37 +0,0 @@ -{% comment %}{% endcomment %} - -{% if site.JB.categories_list.provider == "custom" %} - {% include custom/categories_list %} -{% else %} - {% if categories_list.first[0] == null %} - {% for category in categories_list %} -
  • - {{ category | join: "/" }} {{ site.categories[category].size }} -
  • - {% endfor %} - {% else %} - {% for category in categories_list %} -
  • - {{ category[0] | join: "/" }} {{ category[1].size }} -
  • - {% endfor %} - {% endif %} -{% endif %} -{% assign categories_list = nil %} \ No newline at end of file diff --git a/_includes/JB/comments b/_includes/JB/comments deleted file mode 100644 index 4e9e600..0000000 --- a/_includes/JB/comments +++ /dev/null @@ -1,16 +0,0 @@ -{% if site.JB.comments.provider and page.comments != false %} - -{% case site.JB.comments.provider %} -{% when "disqus" %} - {% include JB/comments-providers/disqus %} -{% when "livefyre" %} - {% include JB/comments-providers/livefyre %} -{% when "intensedebate" %} - {% include JB/comments-providers/intensedebate %} -{% when "facebook" %} - {% include JB/comments-providers/facebook %} -{% when "custom" %} - {% include custom/comments %} -{% endcase %} - -{% endif %} \ No newline at end of file diff --git a/_includes/JB/comments-providers/disqus b/_includes/JB/comments-providers/disqus deleted file mode 100644 index 618a7b7..0000000 --- a/_includes/JB/comments-providers/disqus +++ /dev/null @@ -1,14 +0,0 @@ -
    - - -blog comments powered by Disqus diff --git a/_includes/JB/comments-providers/facebook b/_includes/JB/comments-providers/facebook deleted file mode 100644 index 6b3e5e0..0000000 --- a/_includes/JB/comments-providers/facebook +++ /dev/null @@ -1,9 +0,0 @@ -
    - -
    \ No newline at end of file diff --git a/_includes/JB/comments-providers/intensedebate b/_includes/JB/comments-providers/intensedebate deleted file mode 100644 index ab0c3c9..0000000 --- a/_includes/JB/comments-providers/intensedebate +++ /dev/null @@ -1,6 +0,0 @@ - - diff --git a/_includes/JB/comments-providers/livefyre b/_includes/JB/comments-providers/livefyre deleted file mode 100644 index 704b803..0000000 --- a/_includes/JB/comments-providers/livefyre +++ /dev/null @@ -1,6 +0,0 @@ - - \ No newline at end of file diff --git a/_includes/JB/liquid_raw b/_includes/JB/liquid_raw deleted file mode 100644 index a5c1783..0000000 --- a/_includes/JB/liquid_raw +++ /dev/null @@ -1,32 +0,0 @@ -{% comment%}{% endcomment%} - -{% if site.JB.liquid_raw.provider == "custom" %} - {% include custom/liquid_raw %} -{% else %} -
    {{text | replace:"|.", "{" | replace:".|", "}" | replace:">", ">" | replace:"<", "<" }}
    -{% endif %} -{% assign text = nil %} \ No newline at end of file diff --git a/_includes/JB/pages_list b/_includes/JB/pages_list deleted file mode 100644 index 42f827a..0000000 --- a/_includes/JB/pages_list +++ /dev/null @@ -1,39 +0,0 @@ -{% comment %}{% endcomment %} - -{% if site.JB.pages_list.provider == "custom" %} - {% include custom/pages_list %} -{% else %} - {% for node in pages_list %} - {% if node.title != null %} - {% if group == null or group == node.group %} - {% if page.url == node.url %} -
  • {{node.title}}
  • - {% else %} -
  • {{node.title}}
  • - {% endif %} - {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% assign pages_list = nil %} -{% assign group = nil %} \ No newline at end of file diff --git a/_includes/JB/posts_collate b/_includes/JB/posts_collate deleted file mode 100644 index b71c266..0000000 --- a/_includes/JB/posts_collate +++ /dev/null @@ -1,67 +0,0 @@ -{% comment %}{% endcomment %} - - - -{% if site.JB.posts_collate.provider == "custom" %} - {% include custom/posts_collate %} -{% else %} - {% for post in posts_collate %} - {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} - {% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %} - {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} - {% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %} - - {% if forloop.first %} -

    {{this_year}}

    -

    {{this_month}}

    -
      - {% endif %} - -
    • {{ post.date | date: "%Y-%m-%d" }}{{ post.title }}
    • - - {% if forloop.last %} -
    - {% else %} - {% if this_year != next_year %} - -

    {{next_year}}

    -

    {{next_month}}

    -
      - {% else %} - {% if this_month != next_month %} -
    -

    {{next_month}}

    -
      - {% endif %} - {% endif %} - {% endif %} - {% endfor %} -{% endif %} -{% assign posts_collate = nil %} \ No newline at end of file diff --git a/_includes/JB/setup b/_includes/JB/setup deleted file mode 100644 index efcd84b..0000000 --- a/_includes/JB/setup +++ /dev/null @@ -1,22 +0,0 @@ -{% capture jbcache %} - - {% if site.JB.setup.provider == "custom" %} - {% include custom/setup %} - {% else %} - {% if site.safe and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %} - {% assign BASE_PATH = site.JB.BASE_PATH %} - {% assign HOME_PATH = site.JB.BASE_PATH %} - {% else %} - {% assign BASE_PATH = nil %} - {% assign HOME_PATH = "/" %} - {% endif %} - - {% if site.JB.ASSET_PATH %} - {% assign ASSET_PATH = site.JB.ASSET_PATH %} - {% else %} - {% capture ASSET_PATH %}{{ BASE_PATH }}/assets/themes/{{ page.theme.name }}{% endcapture %} - {% endif %} - {% endif %} -{% endcapture %}{% assign jbcache = nil %} \ No newline at end of file diff --git a/_includes/JB/sharing b/_includes/JB/sharing deleted file mode 100644 index f5b1151..0000000 --- a/_includes/JB/sharing +++ /dev/null @@ -1,8 +0,0 @@ -{% if site.safe and site.JB.sharing.provider and page.JB.sharing != false %} - -{% case site.JB.sharing.provider %} -{% when "custom" %} - {% include custom/sharing %} -{% endcase %} - -{% endif %} \ No newline at end of file diff --git a/_includes/JB/tags_list b/_includes/JB/tags_list deleted file mode 100644 index 8eb62a7..0000000 --- a/_includes/JB/tags_list +++ /dev/null @@ -1,33 +0,0 @@ -{% comment %}{% endcomment %} - -{% if site.JB.tags_list.provider == "custom" %} - {% include custom/tags_list %} -{% else %} - {% if tags_list.first[0] == null %} - {% for tag in tags_list %} -
    • {{ tag }} {{ site.tags[tag].size }}
    • - {% endfor %} - {% else %} - {% for tag in tags_list %} -
    • {{ tag[0] }} {{ tag[1].size }}
    • - {% endfor %} - {% endif %} -{% endif %} -{% assign tags_list = nil %} diff --git a/_includes/footer.html b/_includes/footer.html new file mode 100644 index 0000000..98a0c19 --- /dev/null +++ b/_includes/footer.html @@ -0,0 +1,170 @@ + +
      +
      +
      +
      +
        + {% if site.RSS %} +
      • + + + + + + +
      • + {% endif %} + {% if site.twitter_username %} +
      • + + + + + + +
      • + {% endif %} + + + {% if site.zhihu_username %} +
      • + + + + + + +
      • + {% endif %} + {% if site.weibo_username %} +
      • + + + + + + +
      • + {% endif %} + + + {% if site.facebook_username %} +
      • + + + + + + +
      • + {% endif %} + {% if site.github_username %} +
      • + + + + + + +
      • + {% endif %} +
      + +
      +
      +
      +
      + + + + + + + + + + + + + + + + + + + + + + + +{% if site.ga_track_id %} + +{% endif %} + + + +{% if site.ba_track_id %} + +{% endif %} diff --git a/_includes/head.html b/_includes/head.html new file mode 100644 index 0000000..d0cf988 --- /dev/null +++ b/_includes/head.html @@ -0,0 +1,45 @@ + + + + + + + + + + {% if page.title %}{{ page.title }} - {{ site.SEOTitle }}{% else %}{{ site.SEOTitle }}{% endif %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_includes/nav.html b/_includes/nav.html new file mode 100644 index 0000000..5f472a1 --- /dev/null +++ b/_includes/nav.html @@ -0,0 +1,66 @@ + + + diff --git a/_includes/themes/twitter/default.html b/_includes/themes/twitter/default.html deleted file mode 100644 index 9feded1..0000000 --- a/_includes/themes/twitter/default.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - {{ page.title }} - {% if page.description %}{% endif %} - - - - - - - - - - - - - - - - - - - - - - - - - -
      -
      - {{ content }} -
      -
      - -
      - - {% include JB/analytics %} - - diff --git a/_includes/themes/twitter/page.html b/_includes/themes/twitter/page.html deleted file mode 100644 index e48fb48..0000000 --- a/_includes/themes/twitter/page.html +++ /dev/null @@ -1,29 +0,0 @@ - -
      -
      - {{ content }} -
      -
      diff --git a/_includes/themes/twitter/post.html b/_includes/themes/twitter/post.html deleted file mode 100644 index b9bca03..0000000 --- a/_includes/themes/twitter/post.html +++ /dev/null @@ -1,53 +0,0 @@ - - -
      -
      -
      - {{ content }} -
      -
      -
      - Posted: {{ page.date | date: "%Y-%m-%d" }} - - zhulinpinyu -
      -
        -
      • - {% unless page.categories == empty %} -
          -
        • - {% assign categories_list = page.categories %} - {% include JB/categories_list %} -
        - {% endunless %} -
      • -
      • - {% unless page.tags == empty %} -
          -
        • - {% assign tags_list = page.tags %} - {% include JB/tags_list %} -
        - {% endunless %} -
      • -
      - - -
      -
      diff --git a/_includes/themes/twitter/settings.yml b/_includes/themes/twitter/settings.yml deleted file mode 100644 index 7ca7b73..0000000 --- a/_includes/themes/twitter/settings.yml +++ /dev/null @@ -1,2 +0,0 @@ -theme : - name : twitter \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html index 2d9be07..4450d1c 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,6 +1,22 @@ ---- -theme : - name : twitter ---- -{% include JB/setup %} -{% include themes/twitter/default.html %} + + + +{% include head.html %} + + + + + {% include nav.html %} + + {{ content }} + + {% include footer.html %} + + + + + + + + + diff --git a/_layouts/keynote.html b/_layouts/keynote.html new file mode 100644 index 0000000..ea9233a --- /dev/null +++ b/_layouts/keynote.html @@ -0,0 +1,258 @@ +--- +layout: default +--- + + + + + + + +
      + +
      + + +
      +
      +
      + + +
      + + {{ content }} + +
      + + {% if site.duoshuo_share && site.duoshuo_username %} + + +
      +
      + +
      +
      +
      +
      +
      + + {% endif %} + + + + + + {% if site.duoshuo_username %} + +
      +
      +
      +
      + + {% endif %} + + {% if site.disqus_username %} + +
      +
      + +
      +
      + + {% endif %} + +
      + + + +
      +
      +
      + + + + +{% if site.duoshuo_username %} + + + +{% endif %} + + +{% if site.disqus_username %} + + + +{% endif %} + + +{% if site.anchorjs %} + + + + + +{% endif %} diff --git a/_layouts/page.html b/_layouts/page.html index a4a2d0b..62763bc 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -1,5 +1,189 @@ --- layout: default --- -{% include JB/setup %} -{% include themes/twitter/page.html %} + + +
      +
      +
      +
      +
      +

      {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}

      + + {{ page.description }} +
      +
      +
      +
      +
      + + +
      +
      + {% if site.sidebar == false %} + + +
      + {{ content }} +
      + + + {% else %} + + + +
      + {{ content }} +
      + + + {% endif %} +
      +
      diff --git a/_layouts/post.html b/_layouts/post.html index 9971d7c..9536147 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -1,5 +1,227 @@ --- layout: default --- -{% include JB/setup %} -{% include themes/twitter/post.html %} + + + + + + + +
      +
      +
      +
      +
      +
      + {% for tag in page.tags %} + {{ tag }} + {% endfor %} +
      +

      {{ page.title }}

      + {% comment %} + always create a h2 for keeping the margin , Hux + {% endcomment %} + {% comment %} if page.subtitle {% endcomment %} +

      {{ page.subtitle }}

      + {% comment %} endif {% endcomment %} + Posted by {% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %} on {{ page.date | date: "%B %-d, %Y" }} +
      +
      +
      +
      +
      + + +
      +
      +
      + + +
      + + {{ content }} + +
      + + {% if site.duoshuo_share && site.duoshuo_username %} + + +
      +
      + +
      +
      +
      +
      +
      + + {% endif %} + + + + + + {% if site.duoshuo_username %} + +
      +
      +
      +
      + + {% endif %} + + {% if site.disqus_username %} + +
      +
      +
      + + {% endif %} + +
      + + + +
      +
      +
      + +{% if site.duoshuo_username %} + + + +{% endif %} + + +{% if site.disqus_username %} + + + +{% endif %} + + +{% if site.anchorjs %} + + + + + +{% endif %} diff --git a/_plugins/debug.rb b/_plugins/debug.rb deleted file mode 100644 index e1dde39..0000000 --- a/_plugins/debug.rb +++ /dev/null @@ -1,38 +0,0 @@ -# A simple way to inspect liquid template variables. -# Usage: -# Can be used anywhere liquid syntax is parsed (templates, includes, posts/pages) -# {{ site | debug }} -# {{ site.posts | debug }} -# -require 'pp' -module Jekyll - # Need to overwrite the inspect method here because the original - # uses < > to encapsulate the psuedo post/page objects in which case - # the output is taken for HTML tags and hidden from view. - # - class Post - def inspect - "#Jekyll:Post @id=#{self.id.inspect}" - end - end - - class Page - def inspect - "#Jekyll:Page @name=#{self.name.inspect}" - end - end - -end # Jekyll - -module Jekyll - module DebugFilter - - def debug(obj, stdout=false) - puts obj.pretty_inspect if stdout - "
      #{obj.class}\n#{obj.pretty_inspect}
      " - end - - end # DebugFilter -end # Jekyll - -Liquid::Template.register_filter(Jekyll::DebugFilter) \ No newline at end of file diff --git a/_posts/2013-05-16-hello-blog.md b/_posts/2013-05-16-hello-blog.md deleted file mode 100644 index aff0103..0000000 --- a/_posts/2013-05-16-hello-blog.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -layout: post -title: "Hello Blog之jekyll使用简介" -description: "" -category: -tags: [] ---- -{% include JB/setup %} - -####启动本地 jekyll server - jekyll serve - - jekyll serve -w #编辑文件自动刷新 -####创建POST - rake post title="post name" - -其他详情参见[http://jekyllbootstrap.com/usage/jekyll-quick-start.html](http://jekyllbootstrap.com/usage/jekyll-quick-start.html) diff --git a/_posts/2013-05-17-linux.md b/_posts/2013-05-17-linux.md index 23b3fd6..97b6a4e 100644 --- a/_posts/2013-05-17-linux.md +++ b/_posts/2013-05-17-linux.md @@ -5,7 +5,7 @@ description: "" category: ubuntu tags: [linux] --- -{% include JB/setup %} + ####1. tree diff --git a/_posts/2013-05-17-ubuntusublime-text-2-.md b/_posts/2013-05-17-ubuntusublime-text-2-.md index 4a99b5a..1dc9d6f 100644 --- a/_posts/2013-05-17-ubuntusublime-text-2-.md +++ b/_posts/2013-05-17-ubuntusublime-text-2-.md @@ -5,7 +5,7 @@ description: "" category: ubuntu tags: [linux,sublime-text] --- -{% include JB/setup %} + 感谢开源中国网友 [@Wuu](http://my.oschina.net/wugaoxing) 原文链接 [http://my.oschina.net/wugaoxing/blog/121281](http://my.oschina.net/wugaoxing/blog/121281) diff --git a/_posts/2013-05-19-javascriptmapreduce.md b/_posts/2013-05-19-javascriptmapreduce.md index 83bd43a..d7ac2b7 100644 --- a/_posts/2013-05-19-javascriptmapreduce.md +++ b/_posts/2013-05-19-javascriptmapreduce.md @@ -5,7 +5,7 @@ description: "" category: 算法 tags: [javascript, 算法] --- -{% include JB/setup %} + MapReduce理解 感谢[地瓜哥](http://www.diguage.com/). 原文链接:[http://www.diguage.com/archives/75.html](http://www.diguage.com/archives/75.html) diff --git a/_posts/2013-06-08-program-install-on-ubuntu.md b/_posts/2013-06-08-program-install-on-ubuntu.md index 4bd8a57..cb8f927 100644 --- a/_posts/2013-06-08-program-install-on-ubuntu.md +++ b/_posts/2013-06-08-program-install-on-ubuntu.md @@ -5,7 +5,6 @@ description: "" category: ubuntu tags: [linux] --- -{% include JB/setup %} ####java install $ sudo add-apt-repository -y ppa:webupd8team/java diff --git a/_posts/2013-06-08-sublime-text-2.md b/_posts/2013-06-08-sublime-text-2.md index 86dced4..09fdb72 100644 --- a/_posts/2013-06-08-sublime-text-2.md +++ b/_posts/2013-06-08-sublime-text-2.md @@ -5,7 +5,7 @@ description: "" category: ubuntu tags: [linux,sublime-text] --- -{% include JB/setup %} + #####Ubuntu install sublime diff --git a/_posts/2013-06-10-spree-install-guides.md b/_posts/2013-06-10-spree-install-guides.md index 3a14e32..2188818 100644 --- a/_posts/2013-06-10-spree-install-guides.md +++ b/_posts/2013-06-10-spree-install-guides.md @@ -5,7 +5,7 @@ description: "" category: rails tags: [rails] --- -{% include JB/setup %} + ###[spree](https://github.com/zhulinpinyu/spree)安装指南 diff --git a/_posts/2013-06-13-activesupport-.md b/_posts/2013-06-13-activesupport-.md index 5739ac8..42895d0 100644 --- a/_posts/2013-06-13-activesupport-.md +++ b/_posts/2013-06-13-activesupport-.md @@ -5,7 +5,7 @@ description: "" category: ruby tags: [ruby] --- -{% include JB/setup %} + #activesupport diff --git a/_posts/2013-06-14-rubystringsymbol.md b/_posts/2013-06-14-rubystringsymbol.md index a9780d3..ce01ed2 100644 --- a/_posts/2013-06-14-rubystringsymbol.md +++ b/_posts/2013-06-14-rubystringsymbol.md @@ -5,7 +5,7 @@ description: "" category: ruby tags: [ruby] --- -{% include JB/setup %} + ####Ruby中String对象与Symbol对象的区别 diff --git a/_posts/2013-06-15-rubymodule.md b/_posts/2013-06-15-rubymodule.md index 7474982..6066027 100644 --- a/_posts/2013-06-15-rubymodule.md +++ b/_posts/2013-06-15-rubymodule.md @@ -5,7 +5,7 @@ description: "" category: ruby tags: [ruby] --- -{% include JB/setup %} + ####Modules diff --git a/_posts/2013-06-15-rvm-install-for-multi-user.md b/_posts/2013-06-15-rvm-install-for-multi-user.md index face089..6492e10 100644 --- a/_posts/2013-06-15-rvm-install-for-multi-user.md +++ b/_posts/2013-06-15-rvm-install-for-multi-user.md @@ -5,7 +5,7 @@ description: "" category: ruby tags: [ruby] --- -{% include JB/setup %} + RVM install for Multi-User diff --git a/_posts/2013-06-18-ruby-bits-.md b/_posts/2013-06-18-ruby-bits-.md index 9b409f6..aa37f6f 100644 --- a/_posts/2013-06-18-ruby-bits-.md +++ b/_posts/2013-06-18-ruby-bits-.md @@ -5,7 +5,7 @@ description: "" category: ruby tags: [ruby] --- -{% include JB/setup %} + diff --git a/_posts/2013-06-20-rubymonk.md b/_posts/2013-06-20-rubymonk.md index 585ee29..bdf8a35 100644 --- a/_posts/2013-06-20-rubymonk.md +++ b/_posts/2013-06-20-rubymonk.md @@ -5,7 +5,7 @@ description: "" category: ruby tags: [ruby] --- -{% include JB/setup %} + RubyMonk经典习题记录 diff --git a/_posts/2013-06-25-devise-.md b/_posts/2013-06-25-devise-.md index 8070f5a..b0ea03b 100644 --- a/_posts/2013-06-25-devise-.md +++ b/_posts/2013-06-25-devise-.md @@ -5,7 +5,7 @@ description: "" category: gem使用学习 tags: [rails] --- -{% include JB/setup %} + diff --git a/_posts/2013-06-27-cancan-.md b/_posts/2013-06-27-cancan-.md index b70c59b..8304a21 100644 --- a/_posts/2013-06-27-cancan-.md +++ b/_posts/2013-06-27-cancan-.md @@ -5,7 +5,7 @@ description: "" category: gem使用学习 tags: [rails] --- -{% include JB/setup %} + cancan 使用介绍 diff --git a/_posts/2013-07-11-javascript-iife.md b/_posts/2013-07-11-javascript-iife.md index 1e5733b..973a737 100644 --- a/_posts/2013-07-11-javascript-iife.md +++ b/_posts/2013-07-11-javascript-iife.md @@ -5,7 +5,7 @@ description: "" category: javascript tags: [javascript] --- -{% include JB/setup %} + javascript IIFE 立即调用 diff --git a/_posts/2013-08-07-deploy-rails-project-to-vps.md b/_posts/2013-08-07-deploy-rails-project-to-vps.md index 8d5e646..bdf6ccf 100644 --- a/_posts/2013-08-07-deploy-rails-project-to-vps.md +++ b/_posts/2013-08-07-deploy-rails-project-to-vps.md @@ -5,7 +5,7 @@ description: "" category: Ubuntu tags: [deploy,rails] --- -{% include JB/setup %} + #####Deploy Rails project to VPS 服务器环境搭建篇 diff --git a/_posts/2013-08-08-deploy-rails-project-to-vps-.md b/_posts/2013-08-08-deploy-rails-project-to-vps-.md index bb5cffb..a2c23a9 100644 --- a/_posts/2013-08-08-deploy-rails-project-to-vps-.md +++ b/_posts/2013-08-08-deploy-rails-project-to-vps-.md @@ -5,7 +5,7 @@ description: "" category: Ubuntu tags: [deploy,rails] --- -{% include JB/setup %} + 注:数据库,git仓库位于服务器A; web server,app server位于服务器B diff --git a/_posts/2013-08-22-emacscript-5array.md b/_posts/2013-08-22-emacscript-5array.md index 755c236..d93eb10 100644 --- a/_posts/2013-08-22-emacscript-5array.md +++ b/_posts/2013-08-22-emacscript-5array.md @@ -5,7 +5,7 @@ description: "" category: javascript tags: [javascript] --- -{% include JB/setup %} + ######EMACScript 5中Array对象新增的方法。 diff --git a/_posts/2013-08-23-javascriptarray.md b/_posts/2013-08-23-javascriptarray.md index 8c158c6..212c362 100644 --- a/_posts/2013-08-23-javascriptarray.md +++ b/_posts/2013-08-23-javascriptarray.md @@ -5,7 +5,7 @@ description: "" category: javascript tags: [javascript] --- -{% include JB/setup %} + ###### javascript中Array对象的方法 diff --git a/_posts/2013-11-10--check.md b/_posts/2013-11-10--check.md index 6a9f409..f724cd6 100644 --- a/_posts/2013-11-10--check.md +++ b/_posts/2013-11-10--check.md @@ -5,7 +5,7 @@ description: "" category: java tags: [java] --- -{% include JB/setup %} + //字符串 字符出现个数统计 private static String charAccounts(String orginStr){ diff --git a/_posts/2013-11-10--unrepeat.md b/_posts/2013-11-10--unrepeat.md index 1ba14fa..3dde177 100644 --- a/_posts/2013-11-10--unrepeat.md +++ b/_posts/2013-11-10--unrepeat.md @@ -5,7 +5,7 @@ description: "" category: java tags: [java] --- -{% include JB/setup %} + ####合并字符串中重复出现的字符 diff --git a/_posts/2013-11-10-.md b/_posts/2013-11-10-.md index ec2d682..1dfb7a3 100644 --- a/_posts/2013-11-10-.md +++ b/_posts/2013-11-10-.md @@ -5,7 +5,7 @@ description: "" category: Cracking the coding interview tags: [java] --- -{% include JB/setup %} + ####检测字符串中是否有重复出现的字符 diff --git a/_posts/2013-11-13-rotate-the-matrix-by-90-degrees.md b/_posts/2013-11-13-rotate-the-matrix-by-90-degrees.md index 1d1381d..2e50ec9 100644 --- a/_posts/2013-11-13-rotate-the-matrix-by-90-degrees.md +++ b/_posts/2013-11-13-rotate-the-matrix-by-90-degrees.md @@ -5,7 +5,7 @@ description: "" category: Cracking the coding interview tags: [java] --- -{% include JB/setup %} + 参考链接:[http://hawstein.com/posts/1.6.html](http://hawstein.com/posts/1.6.html) ####一张图像表示成NxN的矩阵,图像中每个像素是4个字节,写一个函数把图像旋转90度。 你能原地进行操作吗?(即不开辟额外的存储空间) diff --git a/_posts/2013-11-13-two-words-is-or-not-a-anagrams.md b/_posts/2013-11-13-two-words-is-or-not-a-anagrams.md index dc9e088..345abde 100644 --- a/_posts/2013-11-13-two-words-is-or-not-a-anagrams.md +++ b/_posts/2013-11-13-two-words-is-or-not-a-anagrams.md @@ -5,7 +5,7 @@ description: "" category: Cracking the coding interview tags: [java] --- -{% include JB/setup %} + `注:变位词(anagrams)指的是组成两个单词的字符相同,但位置不同的单词。比如说, abbcd和abcdb就是一对变位词。` diff --git a/_posts/2013-11-14-matrix-set-0-for-row-and-col.md b/_posts/2013-11-14-matrix-set-0-for-row-and-col.md index 2127e7a..19d580a 100644 --- a/_posts/2013-11-14-matrix-set-0-for-row-and-col.md +++ b/_posts/2013-11-14-matrix-set-0-for-row-and-col.md @@ -5,7 +5,7 @@ description: "" category: Cracking the coding interview tags: [java] --- -{% include JB/setup %} + 参考链接:[http://hawstein.com/posts/1.7.html](http://hawstein.com/posts/1.7.html) diff --git a/_posts/2013-11-14-rotation.md b/_posts/2013-11-14-rotation.md index 00ce194..6987197 100644 --- a/_posts/2013-11-14-rotation.md +++ b/_posts/2013-11-14-rotation.md @@ -5,7 +5,7 @@ description: "" category: Cracking the coding interview tags: [java] --- -{% include JB/setup %} + 参考链接:[http://hawstein.com/posts/1.8.html](http://hawstein.com/posts/1.8.html) diff --git a/_posts/2013-11-15-setup-rails-development-environment.md b/_posts/2013-11-15-setup-rails-development-environment.md index 6dc9316..5042789 100644 --- a/_posts/2013-11-15-setup-rails-development-environment.md +++ b/_posts/2013-11-15-setup-rails-development-environment.md @@ -5,7 +5,7 @@ description: "" category: rails tags: [linux, ruby, rails] --- -{% include JB/setup %} + ####Ubuntu下Ruby on Rails开发环境的安装 diff --git a/_posts/2013-11-21-use-css3-paint-triangle.md b/_posts/2013-11-21-use-css3-paint-triangle.md index 76194e1..6c4ef98 100644 --- a/_posts/2013-11-21-use-css3-paint-triangle.md +++ b/_posts/2013-11-21-use-css3-paint-triangle.md @@ -5,7 +5,7 @@ description: "" category: css3 tags: [css3] --- -{% include JB/setup %} +