【Github】使用Github Pages建独立博客&Github在Mac(转)

使用Github Pages建独立博客

GoDaddy域名解析设置(详细图解)

Github非常赞的教程

DNS errors

官网教程

搭建本地jekyll环境遇到问题:

参考地址

据说gem source会被墙,所以在正式安装jekyll之前可以先换成淘宝的镜像

$ gem sources -l
$ gem sources --remove https://rubygems.org/ 
$ gem sources -a http://ruby.taobao.org/
$ gem install jekyll

报错1:You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

解决方案:(在前面加上 sudo)

$sudo gem install jekyll

报错2:

marongdeMacBook-Pro:jekyllTry marong$ jekyll --server 
Deprecation: Jekyll now uses subcommands instead of just switches. Run `jekyll help' to find out more. 
Deprecation: The --server command has been replaced by the 'serve' subcommand. 
invalid option: --server 
marongdeMacBook-Pro:jekyllTry marong$ jekyll --serve 
Deprecation: Jekyll now uses subcommands instead of just switches. Run `jekyll help' to find out more.

解决方案:(jekyll --serve 改为 jekyll serve)

报错3:

从github上clone下来jekyll的项目,用将site_template内文件拷贝到我的空项目目录中,jekyll serve启动失败。清空我的项目文件夹,再将jekyll项目根目录下site中所有文件拷贝到我的项目文件夹中,运行成功。不明。

marongdeMacBook-Pro:jekyllTry marong$ jekyll serve
Configuration file: /Users/marong/Project/github/jekyllTry/_config.yml
            Source: /Users/marong/Project/github/jekyllTry
       Destination: /Users/marong/Project/github/jekyllTry/_site
      Generating... 
             ERROR: YOUR SITE COULD NOT BE BUILT:
                    ------------------------------------
                    Post 0000-00-00-welcome-to-jekyll.markdown.erb does not have a valid date.
marongdeMacBook-Pro:jekyllTry marong$ jekyll serve
Configuration file: /Users/marong/Project/github/jekyllTry/_config.yml
            Source: /Users/marong/Project/github/jekyllTry
       Destination: /Users/marong/Project/github/jekyllTry/_site
      Generating... done.
    Server address: http://0.0.0.0:4000
  Server running... press ctrl-c to stop.


你可能感兴趣的:(【Github】使用Github Pages建独立博客&Github在Mac(转))