我的博客地址http://lx.nextdev.topnode
这篇文章介绍了如何用coding page +hexo 无成本搭建我的博客。git
打开 cmd
输入:canvas
npm install -g hexo-cli
新建hexo项目:windows
hexo init <项目名称>
而后安装依赖:浏览器
npm install
完成!微信
在 _config.yml
中能够修改配置。hexo
网站主配置:网站
title: 博客的名称 subtitle: 副标题 description: 博客的短描述 author: 做者 language: zh-Hans
域名配置:
url: 你的域名 root: 网站根目录,默认为/ permalink: 文章URL配置
主题配置:
theme: 在这里能够设置主题
推荐使用 next主题
git配置:
deploy: type: git repo: 项目库地址 branch: 分支
配置完成后输入:
npm install hexo-deployer-git --save
OK!博客配置完了
用 cmd
打开 hexo
项目目录,输入:
git clone https://github.com/iissnan/hexo-theme-next themes/next
打开站点配置文件,修改如下代码:
theme: next
在 cmd
中输入:
hexo g
而后再输入:
hexo s
打开浏览器输入:
http://localhost:4000/
在 cmd
中输入:
hexo d
下文的主题配置文件为 \博客\themes\next\_config.yml
打开主题配置文件并找到:
canvas_nest: false
改成:
canvas_nest: true
打开主题配置文件,修改如下内容
reward_comment: 打赏信息 wechatpay: 微信扫码支付的图片地址 alipay: 支付宝扫码支付的图片地址