From b96b2a447858c6e0cc9bc31c7e58e5011c80884c Mon Sep 17 00:00:00 2001 From: qwernot <491298200@qq.com> Date: Sat, 30 Dec 2023 22:50:08 +0800 Subject: [PATCH] Site updated: 2023-12-30 22:50:08 --- 2023/12/29/dome/index.html | 77 +++++++++++++++++++++--- archives/2023/12/index.html | 4 +- archives/2023/index.html | 4 +- archives/index.html | 4 +- index.html | 22 +++++-- "tags/hexo\343\200\201GitHub/index.html" | 4 +- 6 files changed, 95 insertions(+), 20 deletions(-) diff --git a/2023/12/29/dome/index.html b/2023/12/29/dome/index.html index 46cd7d4..29313ee 100644 --- a/2023/12/29/dome/index.html +++ b/2023/12/29/dome/index.html @@ -1,13 +1,13 @@ -Hexo+GitHub 搭建个人博客 | 子墨の小屋 +Hexo+GitHub 搭建个人博客 | 子墨の小屋 - + - + @@ -55,8 +55,8 @@ isPost: true, isHome: false, isHighlightShrink: false, - isToc: false, - postUpdate: '2023-12-30 19:23:02' + isToc: true, + postUpdate: '2023-12-30 22:48:38' }

Hexo+GitHub 搭建个人博客

准备工作
nodejs、js

-

安装
通过官网步骤安装
生成ssh,加入GitHub,提交

-
文章作者: 何子墨
文章链接: https://qwernot.github.io/2023/12/29/dome/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 子墨の小屋
avatar
何子墨
手握日月摘星辰
摸鱼
公告
,

mao

微信号:HT-T-TH

QQ号:491298200

最新文章
-

Hexo+GitHub 搭建个人博客

准备工作

安装必要的软件

+

Node.js

https://nodejs.org/en/

+
    +
  • Windows:通过 nvs(推荐)或者 nvm 安装。
  • +
  • Mac:使用 HomebrewMacPorts 安装。
  • +
  • Linux(DEB/RPM-based):从 NodeSource 安装。
  • +
  • 其它:使用相应的软件包管理器进行安装,可以参考由 Node.js 提供的 指导
  • +
+

git

https://git-scm.com/

+
    +
  • Windows:下载并安装 git.
  • +
  • Mac:使用 Homebrew, MacPorts 或者下载 安装程序
  • +
  • Linux (Ubuntu, Debian):sudo apt-get install git-core
  • +
  • Linux (Fedora, Red Hat, CentOS):sudo yum install git-core
  • +
+

安装 Hexo

官方网址: https://hexo.io/zh-cn/

+

\1. 首先需要建立博客文件夹,建议建在非系统盘,例如 ~E:/Hexo/,那么这个目录就是我们博客的根目录了。
因为每个人的命名习惯不同,本帖之后会以 [Blogroot] 指代博客根目录。

+

\2. 使用 npm 安装 Hexo, 在 [Blogroot] 路径下右键 ->Git Bash Here, 输入

+
1
2
3
4
5
6
BASH
npm config set registry https://registry.npm.taobao.org
#将npm源替换为阿里的镜像。之后的安装就会迅速很多了。
npm install hexo-cli -g
# hexo-cli 是 hexo的指令集。
hexo -v
+ +

\3. 初始化 Hexo 博客:

+
1
2
3
4
5
BASH
## 本地创建一个目录用于存放博客
hexo init
hexo generate
hexo server
+ +

然后在浏览器中打开 localhost:4000 , 就能看到

+

hello world

+

>通过以上 3 种方式部署 Hexo 博客之后,就拥有了一个最简单的个人博客网站了,下面讲讲博客的简单初始化。

+

Hexo 基础修改

修改网站关键信息

Hexo 初始化后,博客网站有一些关键信息是默认的,需要修改为我们自己的信息。

+

网站资料

修改网站各种资料,例如标题、副标题和邮箱等个人资料,请修改博客根目录的站点配置文件 _config.yml:

+
1
2
3
4
5
6
7
8
9
10
YML
# Site
title: 子墨
subtitle: '一枚乐于分享技术与快乐的博主'
description: ''
keywords:
author: haiyong
language: zh-CN
time
zone: ''
+ +

标签页

进入 Hexo 博客的根目录,执行:

+
1
2
BASH
hexo new page tags
+ +

打开 source/tags/index.md 文件,修改如下:

+
1
2
3
4
5
6
MARKDOWN
---
title: 标签
date: 2022-03-11 12:53:45
type: "tags"
---
+ +

分类页

进入 Hexo 博客的根目录,执行:

+
1
2
BASH
hexo new page categories
+ +

打开 source/categories/index.md 文件,修改如下:

+
1
2
3
4
5
6
MARKDOWN
---
title: 分类
date: 2022-03-11 12:56:06
type: "categories"
---
+ +

友情链接

创建友情链接页面

进入 Hexo 博客的根目录,执行:

+
1
2
BASH
hexo new page link
+ + + +

打开 source/link/index.md 文件,修改如下:

+
1
2
3
4
5
6
MARKDOWN
---
title: 友情链接
date: 2022-12-11 12:57:48
type: "link"
---
+ +

友情链接添加

在 Hexo 博客目录中的 source/_data(如果没有 _data 文件夹,请自行创建),创建一个文件 link.yml

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
YML

- class_name: 本站
class_desc: 交换友链可在下方评论,或者微信/QQ联系我
link_list:
- name: 子墨
link: https://www.zmnn.fun
avatar: https://www.zmnn.fun/img/favicon.png
descr: 一个乐于分享技术与快乐的博主

- class_name: 友情链接
class_desc: 那些人,那些事
link_list:
- name: 三笠ぃ
link: https://luciferlpc.top/
avatar: https://luciferlpc.top/img/avatar.jpg
descr: 好好吃饭🍣 好好睡觉💤 敲敲代码
- name: iMaeGoo’s Blog
link: https://www.imaegoo.com
avatar: https://www.imaegoo.com/images/avatar.jpg
descr: 虹墨空间站
+ +

关于我

进入 Hexo 博客的根目录,执行:

+
1
2
BASH
hexo new page about
+ + +

打开 source/about-me/index.md 文件,修改如下:

+
1
2
3
4
5
6
MARKDOWN
---
title: 关于作者
date: 2022-03-11 13:01:21
type: "about"
---
+ + + +

至此,简单的 Hexo 博客框架就完成搭建了

+
文章作者: 何子墨
文章链接: https://qwernot.github.io/2023/12/29/dome/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 子墨の小屋
-
文章总览 - 1
2023
Hexo+GitHub 搭建个人博客
avatar
何子墨
手握日月摘星辰
摸鱼
公告
,

mao

微信号:HT-T-TH

QQ号:491298200

最新文章
网站资讯
文章数目 :
1
本站访客数 :
本站总访问量 :
最后更新时间 :
-
文章总览 - 1
2023
Hexo+GitHub 搭建个人博客
avatar
何子墨
手握日月摘星辰
摸鱼
公告
,

mao

微信号:HT-T-TH

QQ号:491298200

最新文章
网站资讯
文章数目 :
1
本站访客数 :
本站总访问量 :
最后更新时间 :
-
文章总览 - 1
2023
Hexo+GitHub 搭建个人博客
avatar
何子墨
手握日月摘星辰
摸鱼
公告
,

mao

微信号:HT-T-TH

QQ号:491298200

最新文章
网站资讯
文章数目 :
1
本站访客数 :
本站总访问量 :
最后更新时间 :
-
文章总览 - 1
2023
Hexo+GitHub 搭建个人博客
avatar
何子墨
手握日月摘星辰
摸鱼
公告
,

mao

微信号:HT-T-TH

QQ号:491298200

最新文章
网站资讯
文章数目 :
1
本站访客数 :
本站总访问量 :
最后更新时间 :
-
文章总览 - 1
2023
Hexo+GitHub 搭建个人博客
avatar
何子墨
手握日月摘星辰
摸鱼
公告
,

mao

微信号:HT-T-TH

QQ号:491298200

最新文章
网站资讯
文章数目 :
1
本站访客数 :
本站总访问量 :
最后更新时间 :
-
文章总览 - 1
2023
Hexo+GitHub 搭建个人博客
avatar
何子墨
手握日月摘星辰
摸鱼
公告
,

mao

微信号:HT-T-TH

QQ号:491298200

最新文章
网站资讯
文章数目 :
1
本站访客数 :
本站总访问量 :
最后更新时间 :
-
avatar
何子墨
手握日月摘星辰
摸鱼
公告
,

mao

微信号:HT-T-TH

QQ号:491298200

最新文章
网站资讯
文章数目 :
1
本站访客数 :
本站总访问量 :
最后更新时间 :
-
avatar
何子墨
手握日月摘星辰
摸鱼
公告
,

mao

微信号:HT-T-TH

QQ号:491298200

最新文章
网站资讯
文章数目 :
1
本站访客数 :
本站总访问量 :
最后更新时间 :
-
标签 - hexo、GitHub
2023
Hexo+GitHub 搭建个人博客
avatar
何子墨
手握日月摘星辰
摸鱼
公告
,

mao

微信号:HT-T-TH

QQ号:491298200

最新文章
网站资讯
文章数目 :
1
本站访客数 :
本站总访问量 :
最后更新时间 :
-
标签 - hexo、GitHub
2023
Hexo+GitHub 搭建个人博客
avatar
何子墨
手握日月摘星辰
摸鱼
公告
,

mao

微信号:HT-T-TH

QQ号:491298200

最新文章
网站资讯
文章数目 :
1
本站访客数 :
本站总访问量 :
最后更新时间 :
-