用github写blog

因为用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

点击进去就好了,这个就是链接了

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值