Hexo-theme-purabo 快速开始

温馨提示:点击页面下方以展开或折叠目录~

快速开始

安装步骤

2.1 前期准备

确保安装了

  1. node.js
  2. git
  3. npm

安装Hexo

安装完整版hexo

1
npm install -g hexo-cli

2.2 建站

参考 【官方中文文档】

在合适位置打开cmd,输入

1
2
3
hexo init <folder>
cd <folder>
npm install

2.3 启动服务器

1
2
3
hexo clean
hexo g
hexo s

“一键三连”之后在http://localhost:4000就可以看到生成的博客了

CTRL + C可以停止服务器

主题

安装purabo主题

  1. Hexo根目录下,执行命令:
1
git clone git@github.com:abobot/hexo-theme-purabo.git themes/purabo
  1. 更新
1
2
cd themes/purabo
git puull origin master
  1. 使用

修改 Hexo 根目录下的 _config.yml 文件:
theme: purabo

必装插件

Hexo根目录下,执行命令

  1. (hexo-wordcount)[https://github.com/willin/hexo-wordcount]

npm install hexo-wordcount --save

按照2.3可以看到效果
20230926002938

新建文章

新建页面

默认只开启了,首页归档,如果你想打开其他页面

分类

  1. hexo new page categories
  2. 打开source\categories\index.md,在以下位置添加:
1
2
3
4
---
type: categories
layout: categories
---

标签

  1. hexo new page tags
  2. 打开source\tags\index.md,在以下位置添加:
1
2
3
4
---
type: tags
layout: tags
---

项目

  1. hexo new page repository
  2. 打开source\repository\index.md,在以下位置添加:
1
2
3
4
---
type: repository
layout: repository
---

相册

  1. hexo new page gallery
  2. 打开source\gallery\index.md,在以下位置添加:
1
2
3
4
---
type: gallery
layout: gallery
---

书单

  1. hexo new page books
  2. 打开source\books\index.md,在以下位置添加:
1
2
3
4
---
type: books
layout: books
---

友链

  1. hexo new page links
  2. 打开source\links\index.md,在以下位置添加:
1
2
3
4
---
type: links
layout: links
---

关于

  1. hexo new page about
  2. 打开source\about\index.md,在以下位置添加:
1
2
3
4
---
type: about
layout: about
---

404

  1. hexo new page about
  2. 打开source\about\index.md,将内容改为:
1
2
3
4
5
6
7
---
title: 404 Not Found:该页无法显示
toc: false
comments: false
permalink: /404
---
<script type="text/javascript" src="//www.qq.com/404/search_children.js" charset="utf-8" homePageUrl="<%- config.url %>" homePageName="回到我的主页"></script>

部署

参考 部署到github

需要安装插件
npm install hexo-deployer-git --save

1. Hexo-theme-purabo-使用教程
2. Hexo-theme-purabo-快速开始
3. Hexo-theme-purabo-主题及站点配置
4. 插件推荐