Skip to content

Commit a8e8521

Browse files
committed
copycat1
1 parent 2ff11cc commit a8e8521

381 files changed

Lines changed: 4960 additions & 850 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_site
2+
.DS_Store
3+
.sass-cache

404.markdown

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: 404
3+
layout: page
4+
---
5+
6+
Either you or Weiyang got a head stuck. Or both. :(
7+
8+
[Look around!](/index.html)

404.markdown.bak

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: 404
3+
layout: page
4+
---
5+
6+
Nothing found :(
7+
8+
But you still can have a [look around](/index.html)

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
weiyangthecatalyst.name

CNAME.bak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
weiyangthecatalyst.name

README

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Feel free to fork.
2+
Please keep the link in the bottom.

README.bak

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Feel free to fork.
2+
And just please keep the link in the bottom.

Rakefile

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
task :default => :generate
2+
3+
desc 'Create new post with rake "post[post-name]"'
4+
task :post, [:title] do |t, args|
5+
if args.title then
6+
new_post(args.title)
7+
else
8+
puts 'rake "post[post-name]"'
9+
end
10+
end
11+
12+
desc 'Build site with Jekyll'
13+
task :generate => [:clean, :scss] do
14+
`jekyll`
15+
end
16+
17+
desc 'Generate css'
18+
task :scss do
19+
`scss media/css/style.scss media/css/style.css`
20+
end
21+
22+
desc 'Start server'
23+
task :server => [:clean, :scss] do
24+
`jekyll serve -t`
25+
end
26+
27+
desc 'Deploy with rake "depoly[comment]"'
28+
task :deploy, [:comment] => :generate do |t, args|
29+
if args.comment then
30+
`git commit . -m '#{args.comment}' && git push`
31+
else
32+
`git commit . -m 'new deployment' && git push`
33+
end
34+
end
35+
36+
desc 'Clean up'
37+
task :clean do
38+
`rm -rf _site`
39+
end
40+
41+
def new_post(title)
42+
time = Time.now
43+
filename = "_posts/" + time.strftime("%Y-%m-%d-") + title + '.markdown'
44+
if File.exists? filename then
45+
puts "Post already exists: #{filename}"
46+
return
47+
end
48+
uuid = `uuidgen | tr "[:upper:]" "[:lower:]" | tr -d "\n"`
49+
File.open(filename, "wb") do |f|
50+
f << <<-EOS
51+
---
52+
title: #{title}
53+
layout: post
54+
guid: urn:uuid:#{uuid}
55+
tags:
56+
-
57+
---
58+
59+
60+
EOS
61+
%x[echo "#{filename}" | pbcopy]
62+
end
63+
puts "created #{filename}"
64+
`git add #{filename}`
65+
end

_config.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
markdown: rdiscount
2+
pygments: true
3+
permalink: /:year/:month/:day/:title.html
4+
name: "[shutter release]"
5+
markdown: rdiscount
6+
7+
author: "wayne"
8+
atom-baseurl: "http://lhzhang.com"
9+
disqus: "gopherwood"
10+
11+
navigations:
12+
- title: Archive
13+
class: fa fa-list-ul
14+
href: /archive.html
15+
- title: Tags
16+
class: fa fa-tags
17+
href: /tags.html
18+
- title: About
19+
class: fa fa-user
20+
href: /about.html
21+
- title: Gallery
22+
class: fa fa-film
23+
href: http://foto.lhzhang.com
24+
- title: Blogroll
25+
class: fa fa-link
26+
href: /links.html
27+
- title: Subscribe
28+
class: fa fa-rss
29+
href: /atom.xml
30+

_layouts/default.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
3+
<head>
4+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
5+
<meta name="author" content="{{ site.author }}" />
6+
{% if page.title %}
7+
<title>{{ page.title }}</title>
8+
{% else %}
9+
<title>{{ site.name }}</title>
10+
{% endif %}
11+
<link rel="shortcut icon" href="/favicon.ico">
12+
<link href="/atom.xml" rel="alternate" title="{{ site.name }}" type="application/atom+xml" />
13+
<link rel="stylesheet" href="/media/css/style.css">
14+
<link rel="stylesheet" href="/media/css/github.css">
15+
<link rel="stylesheet" href="/media/css/fontawesome.css">
16+
<script src="/media/js/jquery-1.7.1.min.js" type="text/javascript" charset="utf-8"></script>
17+
<script type="text/javascript" src="/media/js/highlight.pack.js"></script>
18+
<script type="text/javascript">
19+
hljs.initHighlightingOnLoad();
20+
</script>
21+
</head>
22+
<body>
23+
<div id="main" role="main">
24+
<header>
25+
<div id="header">
26+
<h1><a title="{{ site.name }}" class="" href="/">{{ site.name }}</a></h1>
27+
</div>
28+
<nav>
29+
{% for nav in site.navigations %}
30+
<span><a title="{{ nav.title }}" href="{{ nav.href }}"><i class="{{ nav.class }}"></i></a></span>
31+
{% endfor %}
32+
</nav>
33+
</header>
34+
<div id="content">
35+
{{ content }}
36+
</div>
37+
<footer>
38+
<div>
39+
{% assign first_post = site.posts | last %}
40+
&copy; {{ first_post.date | date: "%Y" }} ~ {{ site.time | date: "%Y" }} {{ site.author }} | powered by jekyll | themed by <a href="http://lhzhang.com" title="sext vi">sext vi</a> | fork <a href="https://github.com/waynezhang/blog" title="fork me">me</a>
41+
</div>
42+
</footer>
43+
</div> <!-- main -->
44+
</body>
45+
</html>

0 commit comments

Comments
 (0)