Hexo 托管简历

记录一下搭建一个基于Hexo的简历模板的过程

xaoxuu/hexo-theme-resume: A Resume Theme for Hexo. 一个简洁的在线简历主题 https://resume.js.org

效果展示: Jon Snow's Resume

安装

根据文档 | Hexo, 首先安装依赖

1
2
brew install node git
npm i -g hexo-cli

克隆简历项目和主题

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 克隆项目主体框架
git clone https://github.com/xaoxuu/resume-docs.git
# 克隆项目主题文件信息
git clone https://github.com/xaoxuu/hexo-theme-resume.git

# 重命名文件
mv resume-docs my_resume
mv hexo-theme-resume/* my_resume/themes/resume

# 进入目录, 安装依赖
cd my_resume
npm i --force

# 测试生成默认简历信息
hexo cl && hexo g && hexo s

测试通过, 将内容合并成app用于后续打包镜像

1
mv my_resume app

创建Dockerfile

1
2
3
4
5
6
7
8
9
10
11
12
13
FROM node:alpine
MAINTAINER Rex Chow <zrx879582094@gmail.com>

EXPOSE 4000
COPY app/ /app
WORKDIR /app

RUN npm i -g hexo-cli && \
npm i --force

CMD hexo clean && \
hexo generate && \
hexo server

本人使用m1芯片的Mac, 因此默认会构建出基于linux/arm平台的镜像, 该镜像无法在linux/amd64的平台上使用

引出文章: Docker 构建多架构 | Rex Chow's Blog