Skip to content

Commit dca65d1

Browse files
committed
post two blog
1 parent 8e562ad commit dca65d1

File tree

11 files changed

+246
-51
lines changed

11 files changed

+246
-51
lines changed

_config.yml

+5-17
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ permalink: /:categories/:year/:month/:day/:title
55
exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md"]
66
auto: true
77
pygments: true
8+
markdown: rdiscount
89

910
# Themes are encouraged to use these universal variables
1011
# so be sure to set them if your theme uses them.
@@ -25,7 +26,7 @@ author :
2526
# Else if you are pushing to username.github.com, replace with your username.
2627
# Finally if you are pushing to a GitHub project page, include the project name at the end.
2728
#
28-
production_url : http://username.github.com
29+
production_url : http://www.sampeng.org
2930

3031
# All Jekyll-Bootstrap specific configurations are namespaced into this hash
3132
#
@@ -80,16 +81,7 @@ JB :
8081
comments :
8182
provider : disqus
8283
disqus :
83-
short_name : jekyllbootstrap
84-
livefyre :
85-
site_id : 123
86-
intensedebate :
87-
account : 123abc
88-
facebook :
89-
appid : 123
90-
num_posts: 5
91-
width: 580
92-
colorscheme: light
84+
short_name : SamPeng
9385

9486
# Settings for analytics helper
9587
# Set 'provider' to the analytics provider you want to use.
@@ -98,19 +90,15 @@ JB :
9890
analytics :
9991
provider : google
10092
google :
101-
tracking_id : 'UA-123-12'
102-
getclicky :
103-
site_id :
104-
mixpanel :
105-
token : '_MIXPANEL_TOKEN_'
93+
tracking_id : 'UA-30675764-1'
10694

10795
# Settings for sharing helper.
10896
# Sharing is for things like tweet, plusone, like, reddit buttons etc.
10997
# Set 'provider' to the sharing provider you want to use.
11098
# Set 'provider' to false to turn sharing off globally.
11199
#
112100
sharing :
113-
provider : false
101+
provider : addthis
114102

115103
# Settings for all other include helpers can be defined by creating
116104
# a hash with key named for the given helper. ex:

_includes/JB/sina

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<iframe width="350" height="550" class="share_self" frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=350&height=550&fansRow=2&ptype=1&speed=0&skin=9&isTitle=0&noborder=1&isWeibo=0&isFans=0&uid=1642301724&verifier=16585447&dpc=1"></iframe>

_includes/themes/twitter/default.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html>
33
<head>
44
<meta charset="utf-8">
55
<title>{{ page.title }}</title>

_includes/themes/twitter/post.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="page-header">
2-
<h1>{{ page.title }} <small>Supporting tagline</small></h1>
2+
<h1>{{ page.title }}</h1>
33
</div>
44

55
<div class="row">
@@ -13,12 +13,15 @@ <h1>{{ page.title }} <small>Supporting tagline</small></h1>
1313
{% else %}
1414
<li class="prev disabled"><a>&larr; Previous</a></li>
1515
{% endif %}
16-
<li><a href="{{ BASE_PATH }}{{ site.JB.archive_path }}">Archive</a></li>
16+
<li><a href="{{ BASE_PATH }}{{ site.JB.archive_path }}">所有日志</a></li>
1717
{% if page.next %}
1818
<li class="next"><a href="{{ BASE_PATH }}{{ page.next.url }}" title="{{ page.next.title }}">Next &rarr;</a></li>
1919
{% else %}
2020
<li class="next disabled"><a>Next &rarr;</a>
2121
{% endif %}
22+
<li>
23+
{% include JB/sharing %}
24+
</li>
2225
</ul>
2326
</div>
2427
<hr>

_posts/2012-04-08-best-blog-tools.md

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
layout: post
3+
title: "最好的写博客方式诞生"
4+
description: "github,markdwon,jekyll,git,blog"
5+
category: "工具癖"
6+
tags: [github, markdown, jekyll]
7+
---
8+
{% include JB/setup %}
9+
10+
##废话
11+
12+
写博客应该是一件很开心的事,我以前也写很多博客,但后来因为个人懒惰了。就没写了。我不写博客的主要原因就是我懒得进后台去写博客
13+
14+
现在github有了牛b的pages。免费的哦。速度也不错。最最最关键的,是一种支持markdown的工作方式.
15+
16+
周末没什么事做,就把博客搭建起来。等会把其他站的博客全迁移过来.
17+
18+
为什么不用
19+
20+
##初始化
21+
22+
1. 你要有个github账号。就算不懂英语[这个wiki][1]写的很清楚了
23+
24+
2. 安装[Jekyll][2]
25+
26+
3. 安装[Jekyll Bootstrap][3]
27+
28+
4. 创建git资源
29+
30+
注意,创建的git资源直接名字就为XXXX.github.com吧。这样就自动的成为一个github的page资源了。
31+
32+
5. jekyll你要知道的
33+
34+
_config.yml
35+
36+
只要加这几句就行了。其他的默认的不用黏贴进来咯
37+
auto: true
38+
pygments: true
39+
markdown: rdiscount
40+
41+
启动服务
42+
43+
进入日志目录
44+
jekyll --service --pygments
45+
46+
目录关系
47+
48+
_includes {% include xxx %} 就是到这里去找东西了
49+
_layouts 布局,模板文件
50+
_plugins 插件
51+
_posts markdown文件是在这里写的
52+
_site 要用gitignors过滤掉,这个目录是不需要提交到github上的。本地预览就输出到这里了
53+
54+
55+
##绑定域名
56+
57+
* 在repos下建立一个CNAME文件
58+
59+
CNAME的作用是把让github将域名指定到username.github.com
60+
61+
echo "sampeng.org" > CNAME
62+
63+
* 指定DNS转发
64+
65+
DNS要知道域名往那边跳
66+
67+
进入DNS管理页面
68+
a) 如果是顶级域名绑定,添加A记录到207.97.227.245
69+
b) 如果是二级/N级域名绑定,添加CNAME记录到username.github.com
70+
71+
* 访问绑定的域名搞定收工
72+
73+
74+
##开始写博客
75+
76+
[参看这个页面先][4]
77+
78+
基本流程最后变成
79+
80+
1. 自动生成一个日志
81+
82+
装JB的主要原因就是有个rb工具,懒得去记格式和写文件名
83+
84+
进入日志所在的目录
85+
rake post title="xxxxxx"
86+
最后输出会告诉你文件在哪里
87+
88+
2. 用任何编辑器编写这个文件。保存
89+
90+
3. 本地先预览一下(如果看了上面那些链接,都会告诉你默认路径在哪里,恩,通常是http://localhost:4000)
91+
92+
5. 提交到github
93+
94+
最后提交上去,就像git的使用方式一样,只是可能要等一会自动生成页面
95+
96+
git add .
97+
git commit -m "new blog"
98+
git push -u origin master
99+
100+
相当的顺畅,比进浏览器后台写日志方便多了。
101+
102+
不再用在写博客的时候关心布局乱七八糟的事情咯。写就是了,更关键的是,可以在手机上,任何终端上写好。回头按格式提交到github上就可以了。
103+
104+
105+
[1]: http://help.github.com/mac-set-up-git/
106+
[2]: https://github.com/mojombo/jekyll/wiki/Install
107+
[3]: http://jekyllbootstrap.com/index.html#start-now
108+
[4]: http://jekyllbootstrap.com/usage/jekyll-quick-start.html

archive.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: page
3-
title : Archive
3+
title : 归档
44
header : Post Archive
55
group: navigation
66
---

atom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: nil
3-
title : Atom Feed
3+
title : RSS
44
---
55
<?xml version="1.0" encoding="utf-8"?>
66
<feed xmlns="http://www.w3.org/2005/Atom">

categories.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: page
3-
title: Categories
3+
title: 分类
44
header: Posts By Category
55
group: navigation
66
---

index.md

+55-27
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,74 @@
11
---
22
layout: page
3-
title: Hello World!
4-
tagline: Supporting tagline
3+
title: 重新起航
4+
header: 无底洞
55
---
66
{% include JB/setup %}
77

8-
Read [Jekyll Quick Start](http://jekyllbootstrap.com/usage/jekyll-quick-start.html)
8+
用了无数个blog,最好的一个blog被坑爹的运营商给枪毙了。那是多少年前的事了。一直想重新搭建起来,要么是找不到合适的空间,要么是自己懒
99

10-
Complete usage and documentation available at: [Jekyll Bootstrap](http://jekyllbootstrap.com)
10+
算来算去,现在已经有了很多的博客了,cnblog,csdn,还有GAE上,都有我的博客。都是选择的时候弄上去的。
1111

12-
## Update Author Attributes
12+
博客是一个积累知识的好工具,但写博客并不是很方便,工作这么久,很反感跑到网站后台去写博客还要关注各种排版。烦不烦啊~
1313

14-
In `_config.yml` remember to specify your own data:
15-
16-
title : My Blog =)
14+
最近[markdown][1]很火,我也详细的使用了一下。好用多了额。写博客写起来很顺手,不用关心布局,只要写就是了。
15+
16+
于是有了这个博客空间,搭建在[github][2]上的博客.这应该会是我最后集中的博客空间了。正在迁移所有其他博客空间的日志过来。
17+
18+
19+
## 开源项目
20+
21+
作为一个程序员呢,要经常的关注技术领域,偶尔贡献一两个开源代码,代码无非涉及到几点
22+
23+
* 插件
24+
25+
* 小工具
26+
27+
* 软件
28+
29+
以后要多关注这方面的贡献了。希望对其他的朋友有所帮助
30+
31+
[**Sublime Last Edit**][3]
1732

18-
author :
19-
name : Name Lastname
20-
21-
github : username
22-
twitter : username
33+
一个sublime的插件,喜欢很多编辑器的回到上一步编辑点的功能,于是自己开发了一个。欢迎使用
34+
https://github.com/SamPeng87/sublime-last-edit
2335

24-
The theme should reference these variables whenever needed.
2536

26-
## Sample Posts
37+
## 感谢这些公司和朋友
38+
39+
[Thinksns][4]*[智士软件][5]*
40+
41+
我所有的技术都是在这里锻炼出来的,非常感谢带来这么多的帮助。这是一个年轻而且有激情的公司
42+
43+
[Nonant][6]
44+
45+
威武的php开发者,N年工作经验,敬业,热情,主动,真诚
46+
47+
[AVKing][7]
48+
49+
牛掰的IOS开发者,好同事,好朋友。认真,仔细,沉稳
2750

28-
This blog contains sample posts which help stage pages and blog data.
29-
When you don't need the samples anymore just delete the `_posts/core-samples` folder.
51+
[冯涛][8] *[周伯通招聘][9]*
3052

31-
$ rm -rf _posts/core-samples
53+
良师益友,多次在困难时帮助和解惑。现在是一个创业者,希望他走的很远。
3254

33-
Here's a sample "posts list".
55+
[刘晓庆][10]
3456

35-
<ul class="posts">
36-
{% for post in site.posts %}
37-
<li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></li>
38-
{% endfor %}
39-
</ul>
57+
很厉害的创业者,技术,管理各方面样样都行。对朋友交心交底
4058

41-
## To-Do
59+
[王宝明][11]
4260

43-
This theme is still unfinished. If you'd like to be added as a contributor, [please fork](http://github.com/plusjade/jekyll-bootstrap)!
44-
We need to clean up the themes, make theme usage guides with theme-specific markup examples.
61+
年轻有激情的创业者,知识管理倡导和实践者。他的知识管理理论让我叹服,华为的知识管理平台即是他发起和跑起来的。
4562

4663

64+
[1]: http://wowubuntu.com/markdown/basic.html
65+
[2]: https://github.com/
66+
[3]: https://github.com/SamPeng87/sublime-last-edit
67+
[4]: http://www.thinksns.com/
68+
[5]: http://www.zhishisoft.com/
69+
[6]: http://www.antchi.com/
70+
[7]: http://desheng.me
71+
[8]: http://weibo.com/shoutaimu
72+
[9]: http://www.joboto.com/
73+
[10]:http://weibo.com/thinksns
74+
[11]:http://weibo.com/askawang

pages.html

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
layout: page
33
title: Pages
44
header: Pages
5-
group: navigation
65
---
76
{% include JB/setup %}
87

0 commit comments

Comments
 (0)