新技能√

√ New Tech Get... is a website which records my "新技能√".

Fix ‘Invalid Byte Sequence’ When Generating Static Post

| Comments

Error happens

好久没有玩这个东东了,最近在学习Ruby/RoR,所以突然对这个来了兴趣,但是却在运行rake generate时遇到了下列错误

1
2
3
4
5
6
7
λ rake generate
## Generating Site with Jekyll
identical source/stylesheets/screen.css
Configuration from D:/github/earthday.github.io/_config.yml
Building site: source -> public
YAML Exception reading 2013-04-20-welcome.markdown: invalid byte sequence in GBK D:/github/earthday.github.io/plugins/backtick_code_block.rb:13:in `gsub': invalid
 byte sequence in GBK (ArgumentError)

解决办法

外事不决问Google,于是就找到了这个问题的解决办法。参见http://kumu-linux.github.io/blog/2013/04/06/octopress-plus-github/. 就是在命令行中设置:

1
2
set LANG=zh_CN.UTF-8
set LC_ALL=zh_CN.UTF-8

OKay,既然好久没来了,就更新一篇,留个脚印。。哈哈。。

Welcome

| Comments

搭建octopress

搭建主要参考的是如下几篇文章,这里就不再赘述安装过程了。

但是请注意一点,GitHub把pages的网页都转到了*.github.io的域名上了,因此在创建repo时要注意一下。


下面是一些随便的测试

测试一下Javascript
1
alert('hello world~!');
测试一下Python
1
print "hello world~!"
测试一下Scala
1
2
3
object chen {
  println("Hell world~!")
}
测试一下C#
1
2
3
4
5
6
7
8
9
10
11
12
using System;

namesapce N1
{
  class App
  {
      public static void Main(string[] args)
      {
          console.WriteLine("Hello World~! :)");
      }
  }    
}
测试一下C++
1
2
3
4
5
6
#include <iostream>

int main(int argc, char *argv[]) {
  std::cout << "Hi~! World~!\n";
  return 0;
}