因为用python,不会ruby的原因,我采用的是pelican这个python的框架
安装好github客户端之后,配置pelican和markdown
pip install pelican
pip install Markdown
在ubuntu,安装了retext来编辑markdown
在git的文件夹下我新建了一个blog的文件夹,cd进入后,执行
pelican-quickstart
会需要选择一些配置项,按需选择
配置完成后,在文件夹下出现了几个子目录,进入content,编辑一个markdown文档,我新建了一个a.md
内容是:
Date: 2014-01-23
Title: test
Tags: test
Category: Test
Slug: love shuling
【blog正文内容】
就差最后一步了,希望宝贝的年会开心
保存退出后,cd ..回到上级目录
执行make html得到输出,(一定在上级目录执行,我一开始在content下执行,发现make一直无法通过,也没有看到相关资料,后来自己试通的)
在output文件夹 cd output/
git init
在我的github下生成一个repository,叫 whzhcahzxh.github.io
git remote add origin https://github.com/whzhcahzxh/whzhcahzxh.github.io.git
git add .
git commit -m "commit"
git push origin master
然后,就可以了,到github的这个仓库下,看右边的setting,github page有这么一行
GitHub Pages
Changes may take up to ten minutes to be visible.
Your site is published at http://whzhcahzxh.github.io
点击进去就好了,这个就是链接了