Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b083311

Browse files
committed
jekyll问题记录
1 parent b8f47c1 commit b083311

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ github_repo: "https://github.com/foramp/foramp.github.io.git" # you code reposit
1111

1212
# Sidebar settings
1313
sidebar: true # whether or not using Sidebar.
14-
sidebar-about-description: "Goals determine what you going to be!"
14+
sidebar-about-description: "Just Do IT"
1515
sidebar-avatar: /img/about-BY-gentle.jpg # use absolute URL, seeing it's used in both `/` and `/about/`
1616

1717

@@ -86,7 +86,7 @@ kramdown:
8686

8787
# Featured Tags
8888
featured-tags: true # 是否使用首页标签
89-
featured-condition-size: 1 # 相同标签数量大于这个数,才会出现在首页
89+
featured-condition-size: 0 # 相同标签数量大于这个数,才会出现在首页
9090

9191

9292

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: post
3+
title: Jekyll问题记录
4+
subtitle: Jekyll
5+
date: 2018-12-25
6+
author: Ze
7+
header-img: img/home-bg.jpg
8+
catalog: true
9+
tags:
10+
- Jekyll
11+
---
12+
# Jekyll问题记录
13+
14+
#### 本地无法打开中文文件
15+
16+
> 安装好jekyll后,在本地测试是发现自己的博客都无法打开,报404错误。但是提交到git上后就可以正常打开。发现是文件名是中文的问题。
17+
18+
> 解决方案:修改安装目录下的filehandler.rb文件
19+
>
20+
> 找到下列两处,添加一句(+的一行为添加部分)
21+
22+
```c#
23+
path = req.path_info.dup.force_encoding(Encoding.find("filesystem"))
24+
+ path.force_encoding("UTF-8") # 加入编码
25+
if trailing_pathsep?(req.path_info)123
26+
```
27+
28+
```c#
29+
break if base == "/"
30+
+ base.force_encoding("UTF-8") #加入编码
31+
break unless File.directory?(File.expand_path(res.filename + base))
32+
```
33+
34+
35+

about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
33
title: "About"
4-
description: "Hey, this is Ze."
4+
description: "Hey, this is 泽(Ze)."
55
header-img: "img/post-bg-rwd.jpg"
66
---
77

0 commit comments

Comments
 (0)