首页 技术 正文
技术 2022年11月13日
0 收藏 417 点赞 3,541 浏览 1013 个字

使用hexo在github上写blog

安装nodejs

http://nodejs.org/

安装hexo

npm install -g hexo

创建bolg文件夹

安装完成后在自己的工作目录创建一个文件夹

D:\work>mkdir blogD:\work>cd blogD:\work\blog>hexo init  #初始化
[info] Copying data
[info] You are almost done! Don't forget to run `npm install` before you start b
logging with Hexo!D:\work\blog>npm install #安装依赖
hexo-renderer-marked@0.1.0 node_modules\hexo-renderer-marked
├── marked@0.3.2
└── lodash@2.4.1hexo-renderer-ejs@0.1.0 node_modules\hexo-renderer-ejs
├── ejs@1.0.0
└── lodash@2.4.1hexo-renderer-stylus@0.1.0 node_modules\hexo-renderer-stylus
├── stylus@0.44.0 (css-parse@1.7.0, mkdirp@0.3.5, sax@0.5.8, debug@2.1.0, glo
b@3.2.11)
└── nib@1.0.4 (stylus@0.45.1)

执行完上面的命令,就已经搭了一个本地的hexo环境,在当前目录输入命令

hexo generate
hexo server

访问 http://localhost:4000/ ,这时候本地的bolg就搭建好了。

_config.yml设置

参考http://zipperary.com/2013/05/29/hexo-guide-3/

设置主题

https://github.com/hexojs/hexo/wiki/Themes 可以找到喜欢的主题

使用git命令下载比如pacman这个主题

$ git clone https://github.com/A-limon/pacman.git themes/pacman

上传到github

hexo d -g

绑定域名

  1. 需要在git的master分支下创建一个名称为CNAME的文件。
  2. ping name.github.io 的到一个IP地址。
  3. 在dns里面将A记录解析到得到的IP地址。
  4. 等待解析。
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,086
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,561
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,410
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,183
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,820
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,903