Pelican+Github搭建博客

Github設置

註冊後登陸Github,點擊「Creat a new repo」,版本庫名使用'username.github.io'的格式,這裏將username替換成本身的用戶名便可。python

安裝Python、Pelican和Markdown

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

相關文章
相關標籤/搜索