搭建博客

win10搭建hexo博客

1.安装了git,安装nodejs

2.安装cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

通过输入 “npm -v” 来测试是否成功安装。命令如下,出现版本提示表示安装成功:

$ npm -v

npm下载插件要翻墙,使用淘宝镜像的命令:

npm install -g cnpm --registry=https://registry.npm.taobao.org

3.安装hexo框架

命令需要在提示命令符(管理员)打开

cnpm install -g hexo-cli

4.初始化hexo

D:\Blog>hexo init

5.开启

D:\Blog>hexo s

6.创建博客文章

D:\Blog>hexo n "win10下搭建hexo博客"
D:\Blog>hexo clean
INFO  Deleted database.
D:\Blog>hexo g

7.安装git插件

D:\Blog>cnpm install --save hexo-deployer-git

8.配置——config.yml文件

deploy:
  type: 'git'
  repo: https://github.com/LouXueLang/LouXueLang.github.io.git
  branch: master

记住这里是仓库地址

branch不写的话是默认master

9.部署远端

hexo d

如果报错,这是git没有设置用户和邮箱

D:\Blog>git config user.name

D:\Blog>git config user.email

D:\Blog>git config --global user.name "username"

D:\Blog>git config --global user.name "louxuelang"

D:\Blog>git config --global user.email "louxuelang@163.com"

10.访问博客网站

https://louxuelang.github.io/
克隆主题
D:\Blog>git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值