Congiure My Octopress Blog
1.In the _config.yml file
1
|
|
- and
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
- are important.
2. When overcome the problem that there is a blank near the jiathis button
- the find the file under source/javascripts/octopress.js
- locate the function wrapFlashVideos()
1 2 3 4 5 6 7 8 |
|
- add the code
if(object.attr('id') != "JIATHISSWF")
1 2 3 4 5 6 7 8 9 10 |
|
- and soon the error blank will disappear
3.We will use
1 2 |
|
to update the blog
And use the command
1
|
|
- to create a new post blog article called “test”
- So that you can edit the markdown file in the source/_posts
- Add the article under the existing content using the markdown syntax
1
|
|
- to create a new tab named “about me”
- And add the following code to finish the change
1 2 3 4 5 6 |
|
- And we can use the command
1
|
|
- to preview the blog in the browser in the address “localhost:4000”
Only show the abstract of the article on the first page
- Add
<!--more-->
in the article - Then edit _config.yml in
1
|
|
4.if can not push the blog
The solution is to force a push on the master branch.
Edit the Rakefile and look for this line:
system "git push origin #{deploy_branch}"
Alter the line by adding a plus (+) before the #{deploy_branch} tag:
system "git push origin +#{deploy_branch}"
Run the command
rake deploy
It should succeed.
Undo the edit you made to the Rakefile!
5.向Octopress添加JiaThis分享工具及冲突解决
- 在_config.yml底部添加如下配置:
1 2 |
|
- 修改
source/_include/post/sharing.html
,在最后一行</div>
前添加如下代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
解决JiaThis与Octopress冲突
Octopress会对所有有movie属性的object标签添加一层形如
<div class="flash-video"><div>
的wrapper,用于视频回放。- 实现代码在
source/javascripts/octopress.js
中的wrapFlashVideos()函数:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
- 这层wrapper即是形成JiaThis分享工具条左下角小白框的原因。我们需要对object做一个判断,过滤掉JiaThis的object。 将wrapFlashVideos()函数改为以下代码即可:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
6.加入disqus评论
- 把下面这段代码加入到系统原有的disqus_thread.html中,文件在_include/post里面
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
- 然后再在_config.yml里面加入
1 2 |
|
7.add license
- 1.首先
source\_includes\post
目录中添加license.html文件
1 2 3 4 5 6 7 8 9 10 11 12 |
|
- 2.在sass\custom_styles.scss添加如下样式信息来控制版权信息的样式
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
- 3.修改文件
source\_layouts\post.html
- add
1
|
|
int the meta class(去掉{和%之间的空格})
4.在_config.yml添加配置项用来控制是否显示页面的版权信息
1 2 |
|
8.add 3D tag cloud
- download the package first
- 1.Copy the
plugins/category_cloud.rb
to youroctopress/plugins/
; - 2.Copy the
source/_includes/custom/asides/category_cloud.html
to youroctopress/source/_includes/custom/asides/
; - 3.Add the
octopress/source/_includes/custom/asides/
in Step 2 to yourdefault_asides
in youroctopress/_config.yml
file; - 4.Copy the
source/javascripts/tagcloud.swf
to yoursource/javascripts/
folder.