网站搭建日志(1)

Buid My Website! Use 文档 | Hexo

初始化

安装环境

  1. 安装 Git
  2. 安装 Node.js
  3. 安装 Hexo

构建网站

1
hexo init [folder]

修改默认配置

_config.yml

URL

1
2
3
# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: https://cccccrz.github.io/

发布配置

1
2
3
4
5
6
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: git
repository: git@github.com:cccccrz/cccccrz.github.io.git
branch: develop

网站预览

新建文章

1
hexo new [layout] <title>

生成页面

1
hexo generate

提交草稿

1
hexo publish [layout] <filename>

启动本地服务,可以通过localhost:4000访问

1
hexo s

部署

安装hexo-deployer-git插件

1
npm install hexo-deployer-git --save

部署 – 提交至_config.yml 配置的git目录

1
hexo deploy
作者

tty

发布于

2023-04-04

更新于

2023-05-30

许可协议