注册后登陆Github,点击“Creat a new repo”,版本库名使用'username.github.io'的格式,这里将username替换成本身的用户名便可。python
yum install python
pip install pelican
pip install markdown http://wowubuntu.com/markdown/git
搭建博客目录:mkdir blog; cd blog; pelican-quickstart。
进入output文件夹,把username.github.io版本库clone下来:cd output; git clone https://github.com/username/u...。
设置上传部署到Github,修改根目录下的Makefile文件:
OUTPUTDIR=$(BASEDIR)/output/username.github.io
publish:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
github: publish
cd OUTPUTDIR ; git add . ; git commit -am 'your comments' ; git pushgithub
设置pelicanconf.py。bootstrap
MENUITEMS = (("ITEM1","http://github.com"),("ITEM2",URL), ......)。ubuntu
安装主题:git clone https://github.com/getpelican...;cd pelican-themes;pelican-themes -i bootstrap2。
设置主题:THEME = 'bootstrap2'。
推荐主题:Elegant http://oncrashreboot.com/eleg...。markdown