-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
caoxh
committed
Jan 1, 2012
1 parent
385391f
commit fab04a0
Showing
16 changed files
with
161 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rvm use ree@mangege |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
source "http://rubygems.org" | ||
|
||
group :development do | ||
gem 'rake' | ||
gem 'jekyll' | ||
gem 'rdiscount' | ||
gem 'stringex' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
albino (1.3.3) | ||
posix-spawn (>= 0.3.6) | ||
classifier (1.3.3) | ||
fast-stemmer (>= 1.0.0) | ||
directory_watcher (1.4.0) | ||
fast-stemmer (1.0.0) | ||
jekyll (0.11.0) | ||
albino (>= 1.3.2) | ||
classifier (>= 1.3.1) | ||
directory_watcher (>= 1.1.1) | ||
kramdown (>= 0.13.2) | ||
liquid (>= 1.9.0) | ||
maruku (>= 0.5.9) | ||
kramdown (0.13.3) | ||
liquid (2.2.2) | ||
maruku (0.6.0) | ||
syntax (>= 1.0.0) | ||
posix-spawn (0.3.6) | ||
rake (0.9.2) | ||
rdiscount (1.6.8) | ||
stringex (1.3.0) | ||
syntax (1.0.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
jekyll | ||
rake | ||
rdiscount | ||
stringex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# coding: utf-8 | ||
require "rubygems" | ||
require "bundler/setup" | ||
require "stringex" | ||
|
||
github_origin = 'git@github.com:mangege/mangege.github.com.git' | ||
domain = 'www.mangege.com' | ||
|
||
task :default => [:deploy] | ||
|
||
desc 'deploy to github pages' | ||
task :deploy do | ||
puts "deploy site" | ||
system 'rm -rf _site' | ||
system 'jekyll' | ||
cd '_site' do | ||
system "echo -n #{domain} > CNAME" | ||
system "git init" | ||
system "git add ." | ||
system "git commit -m 'site update #{Time.now}'" | ||
system "git remote add origin #{github_origin}" | ||
system "git push -f origin master" | ||
end | ||
end | ||
|
||
# usage rake new_post[my-new-post] or rake new_post['my new post'] or rake new_post (defaults to "new-post") | ||
desc "Create a new Post" | ||
task :new_post, :title do |t, args| | ||
args.with_defaults(:title => 'new-post') | ||
title = args.title | ||
filename = "_source/_posts/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.md" | ||
if File.exist?(filename) | ||
abort("文章 #{filename} 已存在") | ||
end | ||
puts "Creating new post: #{filename}" | ||
open(filename, 'w') do |post| | ||
post.puts "---" | ||
post.puts "layout: post" | ||
post.puts "title: \"#{title.gsub(/&/,'&')}\"" | ||
post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}" | ||
post.puts "categories: " | ||
post.puts "---" | ||
end | ||
#system("vim #{filename}") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# coding: utf-8 | ||
# Jekyll category page generator. | ||
# http://recursive-design.com/projects/jekyll-plugins/ | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
<div id="footer-container"> | ||
<div id="footer"> | ||
<p class="copyright"> | ||
RSS <a href="/atom.xml" rel="subscribe-rss" title="订阅曹小华的博客">订阅</a> 本博客 | | ||
<a href="https://github.com/mangege/mangege" title="本站源码">github</a> | | ||
</p> | ||
<p class="credit">Powered by <a class="wp-link" href="https://github.com/mojombo/jekyll" title="Powered by Jekyll, Jekyll is a simple, blog aware, static site generator. "><span>Jekyll</span></a> and <a class="theme-link" href="http://themehybrid.com/themes/hybrid" title="Hybrid"><span>Hybrid</span></a>.</p></div> | ||
</div><!-- #footer --> | ||
</div><!-- #footer-container --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
layout: post | ||
title: "第一篇技术文章" | ||
date: 2012-01-01 21:42 | ||
categories: tech | ||
--- | ||
|
||
用于初始化技术分类页 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
layout: post | ||
title: "第一篇生活文章" | ||
date: 2012-01-01 21:43 | ||
categories: life | ||
--- | ||
|
||
用于初始化生活分类页 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
layout: nil | ||
--- | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<feed xmlns="http://www.w3.org/2005/Atom"> | ||
|
||
<title><![CDATA[曹小华的博客]]></title> | ||
<link href="http://www.mangege.com/atom.xml" rel="self"/> | ||
<link href="http://www.mangege.com/"/> | ||
<updated>{{ site.time | date_to_xmlschema }}</updated> | ||
<id>http://www.mangege.com/</id> | ||
<author> | ||
<name><![CDATA[曹小华]]></name> | ||
</author> | ||
|
||
{% for post in site.posts limit: 20 %} | ||
<entry> | ||
<title type="html"><![CDATA[{{ post.title }}]]></title> | ||
<link href="http://www.mangege.com/{{ post.url }}"/> | ||
<updated>{{ post.date | date_to_xmlschema }}</updated> | ||
<id>http://www.mangege.com/{{ post.id }}</id> | ||
<content type="html"><![CDATA[{{ post.content }}]]></content> | ||
</entry> | ||
{% endfor %} | ||
</feed> |