博客帮助文档

SUMSC 的博客系统终于更新了(

系统架构升级,使用了更为轻量的 Hexo.js 框架。如果你不折腾的话,甚至都不需要写前端就可以愉快地写博客啦!

使用说明

1 加入 GitHub SUMSC 组织:SUMSC

2 clone 博客源代码(此前需配置 SSH 公钥)

1
$ git clone git@github.com:SUMSC/OfficialWebsiteSource.git

3 安装依赖

1
$ npm i

4 使用如下命令新建一篇博文:

1
$ hexo new file-name

新建的 markdown 文件会保存在 source/_posts 目录下。需设置顶部的 formatter:

1
2
3
4
title: 博文标题
date: 时间
categories:
- 技术博客 活动

之后可以使用 markdown 写博客了。

5 使用如下命令打包,发布:

1
2
3
4
$ hexo cl  # 清理
$ hexo g # 打包
$ hexo s # 预览
$ hexo d # 发布(git push)

6 将源代码的修改推送至本仓库:

1
2
3
4
$ git pull  # push前先pull
$ git add .
$ git commit -m "commit_message"
$ git push origin main