Permalink
Browse files

Merge remote-tracking branch 'origin/master'

  • Loading branch information...
2 parents 39ba08a + de63640 commit 54b91abebae25a2a928c4d999b8d885420160f20 @liuzhe0223 committed Apr 17, 2012
Showing with 1,145 additions and 1,677 deletions.
  1. +0 −23 404.html
  2. +0 −1 CNAME
  3. +0 −17 README.markdown
  4. +81 −0 README.md
  5. +55 −14 Rakefile
  6. +26 −5 _config.yml
  7. +0 −6 _includes/category_page.html
  8. +0 −21 _includes/footer.html
  9. +0 −23 _layouts/category.html
  10. +33 −25 _layouts/default.html
  11. +23 −40 _layouts/post.html
  12. +0 −24 _plugins/growl_generator.rb
  13. +0 −39 _plugins/sass_converter.rb
  14. +0 −7 _posts/2012-02-14-test.markdown
  15. +7 −0 _posts/2012-2-26-first-post.md
  16. +100 −0 _sass/mixins/_syntax.scss
  17. +5 −0 _sass/screen.scss
  18. +53 −0 _site/2012/02/26/first-post.html
  19. +0 −53 _site/404/index.html
  20. +0 −1 _site/CNAME
  21. +0 −17 _site/README.markdown
  22. +0 −24 _site/Rakefile
  23. +29 −0 _site/about.html
  24. +0 −57 _site/about/index.html
  25. +18 −16 _site/atom.xml
  26. +0 −81 _site/config/index.html
  27. +0 −1 _site/googleadd6b8d74a83175f.html
  28. BIN _site/images/2011-05-28/trian.jpg
  29. BIN _site/images/404.jpg
  30. BIN _site/images/a-0.png
  31. BIN _site/images/a-14.png
  32. BIN _site/images/a-2.png
  33. BIN _site/images/a-3.png
  34. BIN _site/images/a.ps
  35. BIN _site/images/about-bottom-bg.png
  36. BIN _site/images/about-content-bg.png
  37. BIN _site/images/about-glow.png
  38. BIN _site/images/about-top-bg.png
  39. BIN _site/images/favicon.ico
  40. BIN _site/images/grid.png
  41. BIN _site/images/heyuan_resume.pdf
  42. BIN _site/images/lime.png
  43. BIN _site/images/lime.png.bak
  44. BIN _site/images/me.jpg
  45. BIN _site/images/parallax_octocat.png
  46. BIN _site/images/parallax_octocat.pxm
  47. BIN _site/images/parallax_octocat_hover.png
  48. BIN _site/images/post-bottom-bg.png
  49. BIN _site/images/post-content-bg.png
  50. BIN _site/images/post-top-bg.png
  51. BIN _site/images/qrcode.png
  52. BIN _site/images/rss_sprite.jpg
  53. BIN _site/images/zhe.jpg
  54. +42 −71 _site/index.html
  55. +0 −45 _site/life/index.html
  56. +28 −0 _site/maikunote.html
  57. +0 −68 _site/projects/index.html
  58. +5 −4 _site/robots.txt
  59. +38 −9 _site/sitemap.xml
  60. +0 −317 _site/stylesheets/default.css
  61. +0 −70 _site/stylesheets/highlight.css
  62. +244 −0 _site/stylesheets/screen.css
  63. +0 −46 _site/tech/index.html
  64. +0 −27 about.html
  65. +8 −0 about.md
  66. +17 −14 atom.xml
  67. +0 −30 config.html
  68. +7 −0 config.rb
  69. +0 −1 googleadd6b8d74a83175f.html
  70. BIN images/a-0.png
  71. BIN images/a-14.png
  72. BIN images/a-2.png
  73. BIN images/a-3.png
  74. BIN images/a.ps
  75. BIN images/about-bottom-bg.png
  76. BIN images/about-content-bg.png
  77. BIN images/about-glow.png
  78. BIN images/about-top-bg.png
  79. BIN images/favicon.ico
  80. BIN images/grid.png
  81. BIN images/lime.png
  82. BIN images/lime.png.bak
  83. BIN images/parallax_octocat.png
  84. BIN images/parallax_octocat.pxm
  85. BIN images/parallax_octocat_hover.png
  86. BIN images/post-bottom-bg.png
  87. BIN images/post-content-bg.png
  88. BIN images/post-top-bg.png
  89. BIN images/qrcode.png
  90. BIN images/rss_sprite.jpg
  91. BIN images/zhe.jpg
  92. +22 −32 index.html
  93. +0 −14 life.html
  94. +0 −17 projects.html
  95. +5 −4 robots.txt
  96. +30 −11 sitemap.xml
  97. +0 −317 stylesheets/default.css
  98. +0 −70 stylesheets/highlight.css
  99. +269 −0 stylesheets/screen.css
  100. +0 −15 tech.html
View
@@ -1,23 +0,0 @@
----
-layout: default
-title: 404 – Not found
----
-<div class="post">
-<div class="top">
-<h2>404 &ndash; 未找到页面</h2>
-</div>
-<div class="content">
-<p>你要找东西不在这里,不妨搜一下本站!</p>
-<div>
- <form action="http://www.google.com/cse" method="get">
- <fieldset>
- <input type="hidden" name="cx" value="014712474749397443257:u5axdnovsmk" />
- <input type="hidden" name="ie" value="UTF-8" />
- <input type="search" name="q" size="31" />
- <input type="submit" name="sa" value="搜索" />
- </fieldset>
- </form>
-</div>
-</div>
-<div class="bottom"></div>
-</div>
View
1 CNAME
@@ -1 +0,0 @@
-liuzhe0223.github.com
View
@@ -1,17 +0,0 @@
-# This is data for my blog
-
-It is automatically generated by [Jekyll](http://github.com/mojombo/jekyll) into a static site. You can visit the live site at [lenage.github.com](http://lenage.github.com). I'm using plugins from [Jekylless](https://github.com/tatey/jekylless) and fork from [tatey.com](http://tatey.com).
-
-## Licence and copyright
-
-Following files, directories and their contents are copyright Tate Johnson. You may not reuse anything therein without my permission:
-
-* _design/
-* about.html
-* images/
-
-Following directories and their contents are licensed under the [Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 Australia](http://creativecommons.org/licenses/by-nc-nd/2.5/au/):
-
-* _posts/
-
-All other files and directories are licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php) unless explicitly stated. If you do use them, a link back to http://tatey.com would be appreciated but is not required.
View
@@ -0,0 +1,81 @@
+# Jekyll Template
+
+This is a template project for jekyll that you can clone and customise to suit your needs. Its quite opinionated in what it provides, the idea is to get you up and running with feed support, analytics and comments and feedback. This is meant for a standalone blog, not for [github pages](http://pages.github.com/)
+
+Please don't fork otherwise I'll see lots of noise on the fork queue that are your customisation for your blog. I suggest you create a repo on github (public or private, its up to you) and do the following assuming the new repo is available at `https://github.com/username/reponame`:
+
+ git clone https://github.com/krisb/jekyll-template.git mysite
+ cd mysite
+ rm -rf .git
+ git init
+ git add -A
+ git commit -m 'initial template based on https://github.com/krisb/jekyll-template'
+ git remote add origin git@github.com:username/reponame.git
+ git push -u origin master
+
+The following sections detail how to set up and use the template. The commands are known to work on my macbook, YRMV.
+
+## Ruby 1.9.2 via RVM
+
+I recommend that you install [rvm](http://rvm.beginrescueend.com/) and set everything up using that. For single user install run the following:
+
+ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
+
+Follow the instructions, adding the necessary lines in `.bashrc`, e.g.
+
+ # RVM
+ if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
+ source "$HOME/.rvm/scripts/rvm"
+ fi
+
+Now source `.bashrc` (you don't need to do this normally as it runs on login, it is just to update the current term window)
+
+ source ~/.bashrc
+
+You can then install and use ruby 1.9.2:
+
+ rvm install 1.9.2
+ rvm use 1.9.2
+
+## Gems
+
+Run the following to install the necessary gems:
+
+ gem install jekyll rdiscount compass
+
+## Markup
+
+I prefer markdown, but you can use a number of supported markup formats.
+
+## Pygments (code highlighting)
+
+Assuming you have python installed with `easy_install` available:
+
+ sudo easy_install Pygments
+
+## Stylesheets
+
+I recommend that you use [compass](http://compass-style.org/). I've included `_sass/mixins/_syntax.scss` for the pygments syntax highlighting.
+
+## Rake deploy task
+
+The following tasks are available (use `rake -T` to list them):
+
+ rake build # Build site with Jekyll
+ rake check_links # Check links for site already running on localhost:4000
+ rake clean # Clean up generated site
+ rake deploy # Build and deploy
+ rake server # Start server with --auto
+
+The deploy task is simplistic and uses rsync to copy the generated site to your server. You will need to replace the username, servername and path as appropriate.
+
+## Configuration
+
+There are a number of values in `_config.yml` to customise your site. Change as appropriate.
+
+The following enhancements are baked in and enabled if you provide the configuration required.
+
+* [Google Analytics](http://www.google.com/analytics) - web analytics using the [async](http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=174090) script
+* [Disqus](http://disqus.com/) - comments and feedback
+* [Feedburner](http://feedburner.google.com/) - rss feeds
+* [Github Ribbon](https://github.com/blog/273-github-ribbons) - fork me on github ribbon
View
@@ -1,24 +1,65 @@
-# Adopted from Scott Kyle's Rakefile
-# http://github.com/appden/appden.github.com/blob/master/Rakefile
-
task :default => :server
-
+
+desc 'Clean up generated site'
+task :clean do
+ cleanup
+end
+
desc 'Build site with Jekyll'
-task :build do
+task :build => :clean do
+ compass
jekyll
end
-
-desc 'Build and start server with --auto'
-task :server do
- jekyll '--server --auto'
+
+desc 'Start server with --auto'
+task :server => :clean do
+ compass
+ jekyll('--server --auto')
+end
+
+desc 'Build and deploy'
+task :deploy => :build do
+ sh 'rsync -rtzh --progress --delete _site/ username@servername:/var/www/websitename/'
end
-#desc 'Build and deploy'
-#task :deploy => :build do
- #sh 'rsync -rtzh --progress --delete _site/ tatey@tatey.com:~/var/www/tatey.com/'
-#end
+desc 'Check links for site already running on localhost:4000'
+task :check_links do
+ begin
+ require 'anemone'
+ root = 'http://localhost:4000/'
+ Anemone.crawl(root, :discard_page_bodies => true) do |anemone|
+ anemone.after_crawl do |pagestore|
+ broken_links = Hash.new { |h, k| h[k] = [] }
+ pagestore.each_value do |page|
+ if page.code != 200
+ referrers = pagestore.pages_linking_to(page.url)
+ referrers.each do |referrer|
+ broken_links[referrer] << page
+ end
+ end
+ end
+ broken_links.each do |referrer, pages|
+ puts "#{referrer.url} contains the following broken links:"
+ pages.each do |page|
+ puts " HTTP #{page.code} #{page.url}"
+ end
+ end
+ end
+ end
-def jekyll(opts = '')
+ rescue LoadError
+ abort 'Install anemone gem: gem install anemone'
+ end
+end
+
+def cleanup
sh 'rm -rf _site'
+end
+
+def jekyll(opts = '')
sh 'jekyll ' + opts
end
+
+def compass(opts = '')
+ sh 'compass compile -c config.rb --force ' + opts
+end
View
@@ -1,6 +1,27 @@
-markdown: maruku
-permalink: pretty
+# standard jekyll configuration
+
+permalink: date
pygments: true
-safe: false
-#paginate: 5
-#limit_posts: 5
+exclude: ['Rakefile', 'README.md', 'config.rb']
+markdown: rdiscount
+
+# configuration required for some pages
+
+domain: liuzhe0223.github.com
+title: Zhe's blog
+author: Liu Zhe
+email: liuzhe0223@gmail.com
+
+# configuration for ehancements, uncomment to enable
+
+# feedburner:
+# id: feedburnerid
+
+# google_analytics:
+# account: UA-XXXXX-X
+
+github:
+ username: liuzhe0223
+
+disqus:
+ id: liuzhe0223
@@ -1,6 +0,0 @@
- {% for post in category_posts %}
- <li>
- <time datetime="{{ post.date | xmlschema }}">{{ post.date | date: "%Y-%m-%d" }}</time>
- <p><a href="{{ post.url }}">{{ post.title }}</a></p>
- </li>
- {% endfor %}
View
@@ -1,21 +0,0 @@
-<div id="footer">
- <div class="top"></div>
- <div class="content">
- <a id ="qrcode" href="http://liuzhe0223.github.com"><img id="left" src="{{ base.url }}/images/qrcode.png" alt="lenage" /></a>
- <p id="web_links">
- Linux用户,使用archlinux+gnome3并乐在其中,现在正在努力的学习ruby
- <a href="#">Twitter</a>,
- <a href="#">豆瓣</a>
- <a href="#">Last.fm</a>,
- <a href="http://github.com/liuzhe0223">GitHub</a>&nbsp; 订阅
- <a href="#">Atom feed</a>.
- <br />
- <span id="copyright"> © {{ site.posts.first.date | date: "%Y"}} lenage. All Rights Reserved.</span>
- </p>
- </div>
- <div class="bottom"></div>
- <!-- start Mixpanel -->
- <script type="text/javascript">var mpq=[];mpq.push(["init","1e8711cdb344603d7e4a32e4a344660f"]);(function(){var b,a,e,d,c;b=document.createElement("script");b.type="text/javascript";b.async=true;b.src=(document.location.protocol==="https:"?"https:":"http:")+"//api.mixpanel.com/site_media/js/api/mixpanel.js";a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(b,a);e=function(f){return function(){mpq.push([f].concat(Array.prototype.slice.call(arguments,0)))}};d=["init","track","track_links","track_forms","register","register_once","identify","name_tag","set_config"];for(c=0;c<d.length;c++){mpq[d[c]]=e(d[c])}})();
- </script>
- <!-- end Mixpanel -->
-</div>
View
@@ -1,23 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <title>{{ page.title }}</title>
- <link href="/stylesheets/default.css" rel="stylesheet" type="text/css">
- <link href="/stylesheets/highlight.css" rel="stylesheet" type="text/css">
- <link href="http://liuzhe0223.github.com" rel="alternate" title="zhe's blog" type="application/atom+xml">
- <link href='/images/favicon.ico' rel='shortcut icon' type='image/ico'>
- </head>
- <body>
- <h1><a href="{{ base.url }}/">lenage<span>.</span>blog</a></h1>
- <nav>
- <ul>
- <li><a href="{{ base.url }}/">Blog</a></li>
- <li><a href="{{ base.url }}/config">Config</a></li>
- <li><a href="{{ base.url }}/about/">About</a></li>
- </ul>
- </nav>
- <h2>CATEGORY » {{ page.title }}</h2>
- {{ content }}
- </body>
-</html>
View
@@ -1,34 +1,42 @@
<!DOCTYPE html>
-<html lang="en">
+<html>
<head>
- <meta charset="utf-8">
- <title>{{ page.title }}</title>
- <link href="/stylesheets/default.css" rel="stylesheet" type="text/css">
- <link href="/stylesheets/highlight.css" rel="stylesheet" type="text/css">
- <link href="http://liuzhe0223.github.com" rel="alternate" title="zhe's blog" type="application/atom+xml">
- <link href='/images/favicon.ico' rel='shortcut icon' type='image/ico'>
+ <title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title>
+ {% if page.description %}
+ <meta name="description" content="{{ page.description }}" />
+ {% endif %}
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link rel="stylesheet" media="screen" href="/stylesheets/screen.css" type="text/css" />
+ {% if site.feedburner %}
+ <link href="http://feeds.feedburner.com/{{ site.feedburner.id }}" rel="alternate" title="{{ site.title }}" type="application/atom+xml" />
+ {% endif %}
+ {% if site.google_analytics %}
+ <!-- google analytics async -->
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '{{ site.google_analytics.account }}']);
+ _gaq.push(['_trackPageview']);
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+ </script>
+ {% endif %}
</head>
<body>
- <div id="wrap">
- <div class="glow"></div>
+ <div id="page">
<div id="header">
- <div class="top"></div>
- <div class="content">
- <h1><a href="{{ base.url }}/">zhe<span>.</span>blog</a></h1>
- <ul id="nav">
- <li><a href="{{ base.url }}/">Blog</a></li>
- <li><a href="{{ base.url }}/config">Config</a></li>
- <li><a href="{{ base.url }}/projects">Projects</a></li>
- <li><a href="{{ base.url }}/about/">About</a></li>
- </ul>
+ <a href="/"><h1>{{ site.title }}</h1></a>
</div>
- <div class="bottom"></div>
+ <div id="body">
+ {% if page.title %}<h1>{{ page.title }}</h1>{% endif %}
+ {{ content }}
</div>
- {{ content }}
- </div>
- <!--Add you link here-->
- <div id="addon">
- <a href="http://github.com/liuzhe0223" id="github"><img src="/images/parallax_octocat.png" alt="Find me on Github"/></a>
- </div>
+ </div>
+
+ {% if site.github %}
+ <a href="http://github.com/{{ site.github.username }}"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a>
+ {% endif %}
</body>
</html>
Oops, something went wrong.

0 comments on commit 54b91ab

Please sign in to comment.