你也能撬起地球Web前端之路让前端飞

0元快速搭建属于自己的博客

2017-04-12  本文已影响507人  凌霄_

个人博客地址http://lx.nextdev.top

这篇文章介绍了如何用coding page +hexo 无成本搭建个人博客。

next主题

需求环境:

必须环境:


开始

npm install -g hexo-cli
hexo init <项目名称>
npm install

_config.yml 中可以修改配置。

title: 博客的名称
subtitle: 副标题
description: 博客的短描述
author: 作者
language: zh-Hans
url: 你的域名
root: 网站根目录,默认为/
permalink: 文章URL配置
theme: 在这里可以设置主题

推荐使用 next主题

deploy:
  type: git
  repo: 项目库地址
  branch: 分支
npm install hexo-deployer-git --save

next主题

开始使用

cmd 打开 hexo 项目目录,输入:

git clone https://github.com/iissnan/hexo-theme-next themes/next

打开站点配置文件,修改以下代码:

theme: next

运行

cmd 中输入:

hexo g

然后再输入:

hexo s

打开浏览器输入:

http://localhost:4000/

成功!

部署到coding

cmd 中输入:

hexo d

拓展

下文的主题配置文件为 \博客\themes\next\_config.yml

canvas_nest: false
canvas_nest: true
reward_comment: 打赏信息
wechatpay: 微信扫码支付的图片地址
alipay: 支付宝扫码支付的图片地址

好了,你的博客到此为止,已经搭建完成。

上一篇 下一篇

猜你喜欢

热点阅读