2017-02-06
安装 jekyll
sudo gem install jekyll
➜ ~ jekyll --version
jekyll 3.4.0
安装 bundler. 它是管理其他gem兼容性的.
➜ ~ sudo gem install bundler
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/bundle
vi .zshrc
export GEM_HOME=$HOME/ruby
export PATH=$PATH:$GEM_HOME/bin
gem install bundler
bundle install
jekyll new blog
➜ blog ls
Gemfile Gemfile.lock _config.yml _posts _site about.md index.md
➜ blog jekyll serve
修改theme
➜ blog bundle show minima
/Users/zhouhh/ruby/gems/minima-2.1.0
静态html页面,直接在跟目录下创建html文件或者创建子目录,下面存放html文件. 使用原始html页面
theme定制
wordpress导入
gem install jekyll-import
以下这两种, 我没有使用, 而是用了第三方的exitwp
ruby -rubygems -e 'require "jekyll-import";
JekyllImport::Importers::Blogger.run({
"source" => "/Users/zhouhh/blog/abloz.com.17.2.2.xml",
"no-blogger-info" => true, # not to leave blogger-URL info (id and old URL) in the front matter
"replace-internal-link" => false, # replace internal links using the post_url liquid tag.
})'
ruby -rubygems -e 'require "jekyll-import";
JekyllImport::Importers::WordPress.run({
"dbname" => "abloz_wp",
"user" => "root",
"password" => "",
"host" => "localhost",
"socket" => "",
"table_prefix" => "wp_",
"site_prefix" => "",
"clean_entities" => true,
"comments" => true,
"categories" => true,
"tags" => true,
"more_excerpt" => true,
"more_anchor" => true,
"extension" => "html",
"status" => ["publish"]
})'
Whoops! Looks like you need to install 'sequel' before you can use this importer.
If you're using bundler:
1. Add 'gem "sequel"' to your Gemfile
2. Run 'bundle install'
If you're not using bundler:
1. Run 'gem install sequel'.
Whoops! Looks like you need to install 'unidecode' before you can use this importer.
If you're using bundler:
1. Add 'gem "unidecode"' to your Gemfile
2. Run 'bundle install'
If you're not using bundler:
1. Run 'gem install unidecode'.
➜ blog vi Gemfile
gem "sequel"
gem "unidecode"
gem 'mysql2',"0.4.5"
➜ blog bundle install
exitwp 将wordpress.xml转为markdown
下载 exitwp
git clone https://github.com/ablozhou/exitwp.git
pip install pyyaml
将wordpress.xml复制到wordpress-xml目录下 python exitwp.py
中间可能需要解决一些问题, 如果格式不对等. 直接编辑wordpress.xml
将生成的_build目录下的abloz.com目录复制到jekyll的blog目录
提交github
git init
git add remote origin https://github.com/ablozhou/ablozhou.github.io
git pull origin master
From https://github.com/ablozhou/ablozhou.github.io
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
➜ blog git:(master) git pull origin master --allow-unrelated-histories
git add .
git commit -m "初始化 "
git push
配置dns
配置dns, 将域名的cname配置为 ablozhou.github.io 包括@和www
源码里面也需创建CNAME, 并提交到github
➜ blog git:(master) cat CNAME abloz.com www.abloz.com
如非注明转载, 均为原创. 本站遵循知识共享CC协议,转载请注明来源
FEATURED TAGS
css
vc6
http
automake
linux
make
makefile
voip
乱码
awk
flash
vista
vi
vim
javascript
pietty
putty
ssh
posix
subversion
svn
windows
删除
编译
多线程
wxwidgets
ie
ubuntu
开源
c
python
bash
备份
性能
scp
汉字
log
ruby
中文
bug
msn
nginx
php
shell
wordpress
mqueue
android
eclipse
java
mac
ios
html5
js
mysql
protobuf
apache
hadoop
install
iocp
twisted
centos
mapreduce
hbase
thrift
tutorial
hive
erlang
lucene
hdfs
sqoop
utf8
filter
草原
yarn
ganglia
恢复
scrapy
django
fsimage
flume
tail
flume-ng
mining
scala
go
kafka
gradle
cassandra
baas
spring
postgres
maven
mybatis
mongodb
https
nodejs
镜像
心理学
机器学习
Keras
theano
anaconda
docker
spark
akka-http
json
群论
区块链
加密
抽象代数
离散对数
同余
欧拉函数
扩展欧几里德算法
ES6
node-inspect
debug
win10
vscode
挖矿