Skip to content

Commit ec04bab

Browse files
committed
change them
1 parent c77431d commit ec04bab

Some content is hidden

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

49 files changed

+1805
-940
lines changed

README.md

+4-39
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,5 @@
1-
# Jekyll-Bootstrap
1+
#jekylll blog
22

3-
The quickest way to start and publish your Jekyll powered blog. 100% compatible with GitHub pages
4-
5-
## Usage
6-
7-
For all usage and documentation please see: <http://jekyllbootstrap.com>
8-
9-
## Version
10-
11-
0.3.0 - stable and versioned using [semantic versioning](http://semver.org/).
12-
13-
**NOTE:** 0.3.0 introduces a new theme which is not backwards compatible in the sense it won't _look_ like the old version.
14-
However, the actual API has not changed at all.
15-
You might want to run 0.3.0 in a branch to make sure you are ok with the theme design changes.
16-
17-
## Contributing
18-
19-
20-
To contribute to the framework please make sure to checkout your branch based on `jb-development`!!
21-
This is very important as it allows me to accept your pull request without having to publish a public version release.
22-
23-
Small, atomic Features, bugs, etc.
24-
Use the `jb-development` branch but note it will likely change fast as pull requests are accepted.
25-
Please rebase as often as possible when working.
26-
Work on small, atomic features/bugs to avoid upstream commits affecting/breaking your development work.
27-
28-
For Big Features or major API extensions/edits:
29-
This is the one case where I'll accept pull-requests based off the master branch.
30-
This allows you to work in isolation but it means I'll have to manually merge your work into the next public release.
31-
Translation : it might take a bit longer so please be patient! (but sincerely thank you).
32-
33-
**Jekyll-Bootstrap Documentation Website.**
34-
35-
The documentation website at <http://jekyllbootstrap.com> is maintained at https://github.com/plusjade/jekyllbootstrap.com
36-
37-
38-
## License
39-
40-
[MIT](http://opensource.org/licenses/MIT)
3+
* 基于jekyll的blog
4+
* 使用了bootstrap框架
5+
* 使用font-awesome进行修饰

_config.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
# This is the default format.
22
# For more see: http://jekyllrb.com/docs/permalinks/
3-
permalink: /:categories/:year/:month/:day/:title
4-
3+
permalink: /:year/:month/:day/:title
4+
markdown: rdiscount
55
exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md"]
66
highlighter: pygments
7+
#mardown: redcarpet
78

9+
safe: false
810
# Themes are encouraged to use these universal variables
911
# so be sure to set them if your theme uses them.
1012
#
11-
title : Jekyll Bootstrap
13+
title : 寂寞先生
1214
tagline: Site Tagline
1315
author :
14-
name : Name Lastname
16+
name : 陈佳伟
1517
1618
github : username
1719
twitter : username
@@ -25,7 +27,7 @@ author :
2527
# Else if you are pushing to username.github.io, replace with your username.
2628
# Finally if you are pushing to a GitHub project page, include the project name at the end.
2729
#
28-
production_url : http://username.github.io
30+
production_url : http://enml.github.io/blog
2931

3032
# All Jekyll-Bootstrap specific configurations are namespaced into this hash
3133
#
@@ -54,7 +56,7 @@ JB :
5456
# - Only the following values are falsy: ["", null, false]
5557
# - When setting BASE_PATH it must be a valid url.
5658
# This means always setting the protocol (http|https) or prefixing with "/"
57-
BASE_PATH : false
59+
BASE_PATH : /blog
5860

5961
# By default, the asset_path is automatically defined relative to BASE_PATH plus the enabled theme.
6062
# ex: [BASE_PATH]/assets/themes/[THEME-NAME]
@@ -64,7 +66,7 @@ JB :
6466
# http://s3.amazonaws.com/yoursite/themes/watermelon
6567
# /assets
6668
#
67-
ASSET_PATH : false
69+
ASSET_PATH : False
6870

6971
# These paths are to the main pages Jekyll-Bootstrap ships with.
7072
# Some JB helpers refer to these paths; change them here if needed.
@@ -100,7 +102,7 @@ JB :
100102
analytics :
101103
provider : google
102104
google :
103-
tracking_id : 'UA-123-12'
105+
tracking_id : 'UA-50637568-1'
104106
getclicky :
105107
site_id :
106108
mixpanel :

_includes/JB/liquid_raw

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Using one will break the other if you plan to deploy to GitHub pages.
77
see: https://github.com/mojombo/jekyll/issues/425
88

99
Since I don't want to mess with Liquid versions, I'll just rewrite the way I
10-
intend to give liquid examples. It's not an elegant solution by any means:
10+
intend to give liquid examples. It's not an elegant by any means:
1111

1212
Usage:
1313
1) Define a 'text' variable with the block of liquid code you intend to display.

_includes/JB/posts_collate

+15-4
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,30 @@ Usage:
2727
{% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %}
2828

2929
{% if forloop.first %}
30-
<h2>{{this_year}}</h2>
30+
31+
32+
<div class="hat_title">{{this_year}}</div>
33+
<div class="post_list">
3134
<h3>{{this_month}}</h3>
3235
<ul>
36+
3337
{% endif %}
3438

3539
<li><span>{{ post.date | date: "%B %e, %Y" }}</span> &raquo; <a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></li>
36-
40+
3741
{% if forloop.last %}
3842
</ul>
43+
3944
{% else %}
4045
{% if this_year != next_year %}
4146
</ul>
42-
<h2>{{next_year}}</h2>
47+
</div>
48+
49+
50+
51+
52+
<div class="hat_title">{{next_year}}</div>
53+
<div class="post_list">
4354
<h3>{{next_month}}</h3>
4455
<ul>
4556
{% else %}
@@ -52,4 +63,4 @@ Usage:
5263
{% endif %}
5364
{% endfor %}
5465
{% endif %}
55-
{% assign posts_collate = nil %}
66+
{% assign posts_collate = nil %}</div>

_includes/themes/twitter/default.html

+14-8
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
<!-- Le styles -->
1818
<link href="{{ ASSET_PATH }}/bootstrap/css/bootstrap.2.2.2.min.css" rel="stylesheet">
1919
<link href="{{ ASSET_PATH }}/css/style.css?body=1" rel="stylesheet" type="text/css" media="all">
20-
20+
<link href="{{ ASSET_PATH }}/css/prettify.css" rel="stylesheet" type="text/css">
21+
<script src="{{ ASSET_PATH }}/js/prettify.js"></script>
2122
<!-- Le fav and touch icons -->
2223
<!-- Update these with your own images
2324
<link rel="shortcut icon" href="images/favicon.ico">
@@ -29,14 +30,17 @@
2930
<!-- atom & rss feed -->
3031
<link href="{{ BASE_PATH }}{{ site.JB.atom_path }}" type="application/atom+xml" rel="alternate" title="Sitewide ATOM Feed">
3132
<link href="{{ BASE_PATH }}{{ site.JB.rss_path }}" type="application/rss+xml" rel="alternate" title="Sitewide RSS Feed">
32-
33+
34+
<!-- font-awesome-->
35+
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
36+
3337
</head>
3438

35-
<body>
39+
<body onload="prettyPrint()">
3640
<div class="navbar">
3741
<div class="navbar-inner">
38-
<div class="container-narrow">
39-
<a class="brand" href="{{ HOME_PATH }}">{{ site.title }}</a>
42+
<div class="nav-narrow">
43+
<a class="brand" href="{{ HOME_PATH }}"><span class="fa fa-mortar-board (alias)">{{ site.title }}</span></a>
4044
<ul class="nav">
4145
{% assign pages_list = site.pages %}
4246
{% assign group = 'navigation' %}
@@ -51,12 +55,14 @@
5155
<div class="content">
5256
{{ content }}
5357
</div>
54-
<hr>
55-
<footer>
56-
<p>&copy; {{ site.time | date: '%Y' }} {{ site.author.name }}
58+
59+
<footer class="card clearfix">
60+
<span style="font-size:30px;"class="fa fa-github pull-left"></span><a href="https://github.com/enml/blog/tree/jekyll-blog" style="display:inline-block;padding-right:80px;border-right:1px solid #bbb">fork me on GitHub</a>
61+
<p class="pull-right">&copy; 2011 {{ site.author.name }}
5762
with help from <a href="http://jekyllbootstrap.com" target="_blank" title="The Definitive Jekyll Blogging Framework">Jekyll Bootstrap</a>
5863
and <a href="http://twitter.github.com/bootstrap/" target="_blank">Twitter Bootstrap</a>
5964
</p>
65+
6066
</footer>
6167

6268
</div>

_includes/themes/twitter/page.html

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
<!--
12
<div class="page-header">
23
<h1>{{ page.title }} {% if page.tagline %} <small>{{ page.tagline }}</small>{% endif %}</h1>
34
</div>
5+
-->
46

57
<div class="row-fluid">
68
<div class="span12">

_includes/themes/twitter/post.html

+27-19
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,57 @@
1+
<!--
12
<div class="page-header">
23
<h1>{{ page.title }} {% if page.tagline %}<small>{{page.tagline}}</small>{% endif %}</h1>
34
</div>
5+
-->
6+
47

58
<div class="row-fluid post-full">
6-
<div class="span12">
7-
<div class="date">
8-
<span>{{ page.date | date_to_long_string }}</span>
9-
</div>
10-
<div class="content">
9+
<div class="span12 ">
10+
<div class="content card">
11+
<div class="date_label">
12+
<div class="day_month">
13+
{{ page.date | date:"%m/%d" }}
14+
</div>
15+
<div class="year">
16+
{{ page.date | date:"%Y" }}
17+
</div>
18+
</div>
1119
{{ content }}
1220
</div>
1321

14-
{% unless page.categories == empty %}
15-
<ul class="tag_box inline">
22+
23+
<!--{% unless page.categories == empty %}
24+
<ul class="tag_box inline ">
1625
<li><i class="icon-folder-open"></i></li>
1726
{% assign categories_list = page.categories %}
1827
{% include JB/categories_list %}
1928
</ul>
2029
{% endunless %}
2130
2231
{% unless page.tags == empty %}
23-
<ul class="tag_box inline">
32+
<ul class="tag_box inline ">
2433
<li><i class="icon-tags"></i></li>
2534
{% assign tags_list = page.tags %}
2635
{% include JB/tags_list %}
2736
</ul>
28-
{% endunless %}
29-
30-
<hr>
31-
<div class="pagination">
32-
<ul>
37+
{% endunless %} -->
38+
39+
<div class="pagination clearfix">
40+
<ul class = "pull-right">
3341
{% if page.previous %}
34-
<li class="prev"><a href="{{ BASE_PATH }}{{ page.previous.url }}" title="{{ page.previous.title }}">&larr; Previous</a></li>
42+
<li class="prev"><a class="fa fa-arrow-circle-left" href="{{ BASE_PATH }}{{ page.previous.url }}" title="{{ page.previous.title }}"> 前一篇</a></li>
3543
{% else %}
36-
<li class="prev disabled"><a>&larr; Previous</a></li>
44+
<li class="prev disabled" ><a class="fa fa-arrow-circle-left"> 前一篇</a></li>
3745
{% endif %}
38-
<li><a href="{{ BASE_PATH }}{{ site.JB.archive_path }}">Archive</a></li>
46+
<li><a class="fa fa-th" href="{{ BASE_PATH }}{{ site.JB.archive_path }}"> 所有日志</a></li>
3947
{% if page.next %}
40-
<li class="next"><a href="{{ BASE_PATH }}{{ page.next.url }}" title="{{ page.next.title }}">Next &rarr;</a></li>
48+
<li class="next"><a href="{{ BASE_PATH }}{{ page.next.url }}" title="{{ page.next.title }}">后一篇 <span class="fa fa-arrow-circle-right"> </span></a></li>
4149
{% else %}
42-
<li class="next disabled"><a>Next &rarr;</a>
50+
<li class="next disabled"><a >后一篇 <span class="fa fa-arrow-circle-right"> </span></a>
4351
{% endif %}
4452
</ul>
4553
</div>
46-
<hr>
54+
4755
{% include JB/comments %}
4856
</div>
4957
</div>

_layouts/category_archive.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
layout: default
3+
---
4+
<div class="category-archive">
5+
<div>
6+
<span class="title">Category archive for {{ page.category }}</span>
7+
</div>
8+
<div>
9+
<ul>
10+
{{ content }}
11+
</ul>
12+
</div>
13+
</div>

_layouts/default.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
theme :
3-
name : bootstrap-3
3+
name : twitter
44
---
55
{% include JB/setup %}
6-
{% include themes/bootstrap-3/default.html %}
6+
{% include themes/twitter/default.html %}

_layouts/page.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
layout: default
33
---
44
{% include JB/setup %}
5-
{% include themes/bootstrap-3/page.html %}
5+
{% include themes/twitter/page.html %}

_layouts/post.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
layout: default
33
---
44
{% include JB/setup %}
5-
{% include themes/bootstrap-3/post.html %}
5+
{% include themes/twitter/post.html %}

_posts/2011-01-12-prime.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: post
3+
title: js-算出某值以内的质数
4+
category : 技术分享
5+
tagline: "Supporting tagline"
6+
tags : [javascript,算法]
7+
published: true
8+
---
9+
{% include JB/setup %}
10+
# js 算出某值以内的质数
11+
---
12+
13+
<pre class="prettyprint linenums">
14+
//算出 num 以内的所有质数
15+
16+
function prime(num){
17+
var list = [];
18+
for(var i = 2; i <= num; i++){ list.push(i); } //create a Array
19+
20+
for(var i = 0; i < list.length; i++){
21+
for(var j = 2; j < list[i]; j++){
22+
if(list[i] % j == 0){
23+
list.splice(i,1); //delete the non prime number.it will change the index of other elements
24+
j = 2; //由于splice导致list[i+1]的index变为i,因此把j置为2以便对list[i+1]进行重新计算
25+
}
26+
}
27+
}
28+
</pre>

_posts/2014-04-20-githubpages.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
layout: post
3+
title: GitHub基础入门
4+
category : 技术分享
5+
tagline: "Supporting tagline"
6+
tags : jekyll, github
7+
published: false
8+
---
9+
{% include JB/setup %}
10+
11+
# GitHub Pages(像黑客一样写博客)
12+
13+
`技术`
14+
15+
---
16+
17+
是的,之前github的名字其实早已经如雷贯耳,只是我对它望而生畏,始终不敢去触碰它。因为它咋一看上去冷冰冰的,眼之所及,皆为代码;并且又找不到能详细却直观地描述它的理念的教程,所以我始终无从下手。
18+
19+
终于,两天前看到**Blogging like a hacker**这篇文章,决定试试搭建一个基于**github pages**的blog,遂开始尝试。
20+
21+
<!--break-->
22+
23+
首先下载`github`的windows客户端,客户端很简约,这个非常值得称赞。客户端登录后会直接跟你github账号进行绑定同步,因此你能直观的看到github上你的项目文件。硬着头皮尝试各种git命令,不求甚解。以前我很讨厌这种不求甚解的状态,当我在阅读一篇教程时总是希望先了解一下基本脉络,当差不多头脑里有个整体框架后再动手,这样的好处就是你知道你每一步是在做什么,成功率也比较高。但并不是每一篇教程或者每一个项目你都能很快地掌握其基本脉络,就像github。很多教程基本就是直接说输入
24+
25+
>```git push origin master```
26+
27+
之类的,但他没告诉我输入之后能干什么,会发生什么。更没有人告诉我每一次必须先commit message才能提交。所以我只能糊里糊涂地跟着教程走,不过尝试了几遍之后,也就大概理解了脉络。
28+
29+
* github为版本控制系统。也就是说,你每一次的提交都会有相关的标记,以便进行回滚和协作。
30+
* 对于远程代码,可以通过```git clone```语句进行clone,可以clone到本地库,也可以clone到github库中。
31+
* 对于本地代码,可以通过```git remote set-url```语句绑定到对应的repository;也可以通过客户端里的public推送到github上。
32+
* 每一次push前必须先commit -m,客户端里是填写相应的summary。

0 commit comments

Comments
 (0)