LapisCV Typora 英文简历模板解析:基于 template-en.md 的 Markdown 简历结构、图标体系与自定义样式实践
LapisCV Typora 英文简历模板解析:基于 template-en.md 的 Markdown 简历结构、图标体系与自定义样式实践
导读
本文以 LapisCV 项目中面向 Typora 编辑器的英文简历模板 templates/typora/template-en.md 为研究对象,逐段拆解其 Markdown 结构、HTML 辅助标记、图标(转义 Unicode)体系与排版样式机制,并结合仓库中的 Typora 主题 CSS、字体资源与构建脚本,给出从模板编辑到 PDF 导出的完整实战方案。读完本文,你将能够基于该模板快速产出专业简历,并能通过 CSS 变量与自定义样式精确控制版式细节。
说明:LapisCV 是一套基于 Markdown 的简历解决方案,同时支持 VSCode / Typora / Obsidian 三款编辑器,仓库提供了中英文两套模板(template-en.md 与 template-cn.md)。本文以英文模板为主体展开。
一、模板定位与整体结构
template-en.md 位于仓库 templates/typora/ 目录下,是 Typora 平台使用的英文简历模板。它与 templates/typora/template-cn.md(中文版)、templates/vscode/ 与 templates/obsidian/ 下的模板在结构上完全同构,仅针对不同编辑器的样式挂载方式与个别标记写法略有差异(例如 Obsidian 模板将图标实体用 <span> 包裹,以适配其渲染引擎)。
整个模板由五大部分组成:
| 组成 | Markdown 载体 | 作用 |
|---|---|---|
| 姓名标题 | # 一级标题 |
简历顶部主标题(示例为 "The Octocat") |
| 联系信息 | blockquote 引用块 |
电话、邮箱、主页,配图标与等宽字体 |
| 头像 | <img alt="avatar"> |
圆形头像,右浮动显示 |
| 主体板块 | ## 二级标题 + 列表 |
教育经历、工作经验、项目经历、专业技能 |
| 条目标题 | <div alt="entry-title"> |
每条经历的标题行,标题与时间左右两端对齐 |
模板完整内容如下(原文):
# The Octocat
> <span alt="icon"></span> `(123)456-7890`   <span alt="icon"></span> `octocat@github.com`   <span alt="icon"></span> [octocat](https://github.com/octocat)
<img alt="avatar" src="https://avatars.githubusercontent.com/u/583231?v=4">
##  Education
<div alt="entry-title">
<h3>Octo Open-Source University</h3>
</div>
Sept 2008 - June 2028, Bachelor of Science, Computer Science
- **Awards**: GitHub Pair Extraordinaire, GitHub Arctic Code Vault Contributor, GitHub Starstruck, etc.
- **Campus Experience**: OctoStudio Captain, driving tech and open-source innovation for octopus tribe.
##  Work Experience
<div alt="entry-title">
<h3>Software Engineer - OctoConnect Inc., Octoland</h3>
<p>March 2008 - July 2009</p>
</div>
Led a team project to create a social networking platform.
- Designed octopus-inspired user profiles and interactive features such as tentacle-based messaging and ink-splatter reactions to foster community engagement among octopuses and cats worldwide.
- Integrated OAuth authentication with GitHub accounts to enable seamless login and profile synchronization.
<div alt="entry-title">
<h3>Software Develop Intern - OctoTech Solutions, Octoland</h3>
<p>March 2008 - July 2009</p>
</div>
Collaborated with a team of software engineers to develop a data visualization dashboard using Octolang.
- Assisted in troubleshooting and resolving technical issues, demonstrating problem-solving skills and a proactive approach to tackling challenges in a fast-paced environment.
- Provide insights into octopus population trends for marine conservation efforts.
##  Projects
<div alt="entry-title">
<h3>GitFlix</h3>
<a href="https://github.com/octocat/gitflix">github.com/octocat/gitflix</a>
</div>
Developed a full-stack web application using Octo.js for the frontend and OctoScript for the backend, allowing users to discover and rate octopus-themed movies.
- Implemented user authentication and authorization using JSON Web Tokens and bcrypt for security.
- Utilized GitHub Actions for continuous integration and deployment (CI/CD), ensuring efficient workflows.
<div alt="entry-title">
<h3>OctoGithubber</h3>
<a href="https://github.com/octocat/gitflix">github.com/octocat/gitflix</a>
</div>
Developed a web application using Octo.js that integrates with the GitHub API to provide personalized statistics and insights into Octocat's GitHub contributions.
- Implemented features such as octopus-themed data visualizations and achievements to gamify the experience and encourage continuous improvement in open-source contributions.
- Leveraged GitHub Actions for automated testing and deployment.
##  Skills
- Proficient in multiple programming languages, including Octolang, OctoScript, and more, with a strong grasp of object-oriented and functional programming paradigms.
- Excellent communication and collaboration skills, both with octopuses and fellow cats.
- Solid understanding of software development principles, data structures, and algorithms, with a focus on writing clean, efficient, and maintainable code.
- Extensive experience with Git version control, including strategies such as GitFlow and GitHub Flow.
下面逐段说明模板各标记的语义与背后的样式机制。
在 Typora 编辑器中应用 LapisCV 主题后的实际效果如下图所示:
二、头部信息栏与头像
模板头部是一个 blockquote 引用块,承载电话、邮箱与主页链接,每个信息项由 <span alt="icon"> 包裹的转义 Unicode 图标 + 反引号包裹的等宽字体文本构成,项之间用   (全角空格)分隔:
> <span alt="icon"></span> `(123)456-7890`   <span alt="icon"></span> `octocat@github.com`   <span alt="icon"></span> [octocat](https://github.com/octocat)
这一设计对应 styles/main.css 中的三类规则:
h1, blockquote p { text-align: center; }:标题与信息栏均居中显示;blockquote, blockquote * { border-inline-start: none; }:去掉引用块默认的左侧竖线,使信息栏视觉上干净利落;span[alt="icon"] { color: var(--color-accent); }:图标统一渲染为主题色。
头像使用单行 HTML 图片标记,且 alt 必须保持为 avatar:
<img alt="avatar" src="...">
编辑时替换 src 即可,不需要头像时直接删除该行。样式侧 styles/main.css 通过 img[alt="avatar"] 选择器将其处理为圆形、右浮动:
img[alt="avatar"] {
float: right;
width: var(--avatar-width);
height: var(--avatar-width);
border-radius: 50%;
border: 2px solid var(--border-color);
}
同时 p:has(.avatar, img[alt="avatar"]) { height: 0; } 会将该行段落的高度压缩为 0,避免头像撑开布局。头像尺寸由变量 --avatar-width 统一控制,Classic 风格默认 28mm、Serif 风格默认 24mm。
注意:Obsidian 无法识别 HTML 格式插入的本地图片,如需在 Obsidian 中使用,应先把图片上传为链接再插入。
三、四个主体板块:教育、工作、项目、技能
模板主体由四个二级标题板块组成,标题内嵌对应的转义 Unicode 图标:
##  Education(教育经历)##  Work Experience(工作经验)##  Projects(项目经历)##  Skills(专业技能)
3.1 条目标题(entry-title)
每条经历使用 <div alt="entry-title"> 包裹标题信息,形成"条目标题行":
<div alt="entry-title">
<h3>Software Engineer - OctoConnect Inc., Octoland</h3>
<p>March 2008 - July 2009</p>
</div>
对应 styles/main.css 中的规则 div<a href="https://link.gitcode.com/i/c7f074713e12faf82f19a758e0c67c86" target="_blank">alt="entry-title"] { display: flex; justify-content: space-between; align-items: center; }:flex 布局让左侧 <h3>(职位 / 公司)与右侧 <p>(时间)两端对齐,呈现简历中最常见的"岗位-时间"版式。VSCode 模板([templates/vscode/template-en.md)中该结构写法一致,Obsidian 模板(templates/obsidian/template-en.md)则额外将图标包进 <span> 以适配其渲染。
3.2 正文写法
- 教育板块:学历、专业、时间信息直接以普通段落书写,获奖、校园经历用
- **加粗标签**列表组织; - 工作板块:先给一段职责总述,再用项目符号列表逐条列出成果与贡献;
- 项目板块:
entry-title内h3放项目名,<a>放项目链接;链接使用等宽字体--link-font,颜色由--link-color控制; - 技能板块:纯列表,用加粗关键词引导,如
**Awards**、**Campus Experience**。
这种"段落总述 + 列表要点"的组合,既符合招聘方快速扫读的习惯,也便于后续通过 CSS 变量整体调节字号行距。
四、图标系统:转义 Unicode 与 iconfont 字体
模板中的 、 等实体是 HTML 转义的 Unicode 码位,它们指向项目内置的图标字体 fonts/iconfont.ttf。Typora 主题 CSS(styles/classic/typora.css)中通过 @font-face 注册了 LapisCV Icon 字体:
@font-face {
font-family: "LapisCV Icon";
src: url('lapis-cv/fonts/iconfont.ttf?t=1727014108932') format('truetype');
}
而正文与标题的字体栈均以 "LapisCV Icon" 开头(如 font-family: "LapisCV Icon", var(--text-font);),因此这些码位会被 iconfont 字体接管并渲染为图标,其余字符则回退到正文/标题字体。
图标码位采用私有区(Private Use Area)编码,必须原样保留 HTML 实体写法(不能直接粘贴其 Unicode 字符)。项目目前内置 16 个图标,完整对照如下:
| 图标码位 | 用途 | 图标码位 | 用途 |
|---|---|---|---|
 |
电话 |  |
邮箱 |
 |
主页/链接 |  |
工作经历 |
 |
教育经历 |  |
专业技能 |
 |
通用 |  |
通用 |
 |
通用 |  |
通用 |
 |
通用 |  |
通用 |
 |
通用 |  |
通用 |
 |
项目经历 |  |
通用 |
图标的可视化样式可参考 README.md 中的图标预览表(对应 docs/assets 目录下若干 300×300 的图标素材)。模板实际只使用了其中 4 个语义图标(电话、邮箱、主页、四个板块图标),其余码位供按需选用。
五、排版样式机制与 CSS 变量
LapisCV 的排版不是写死在模板里的,而是完全由 CSS 变量驱动。Typora 主题文件 styles/classic/typora.css 通过 @import "lapis-cv/styles/main.css" 引入核心样式,再在 :root 中定义变量默认值。
5.1 核心变量一览
README-CN.md 与样式源码共同给出了变量体系,整理如下:
/* 基础配置 */
--text-size: 10pt; /* 文本字体大小 */
--line-height: 1.8; /* 文本行高 */
--avatar-width: 28mm; /* 头像宽度 */
/* 标题字号 */
--h1-size: 16pt; /* 一级标题字体大小 */
--h2-size: 12pt; /* 二级标题字体大小 */
--h3-size: 10.5pt; /* 三级标题字体大小 */
--blockquote-size: 9.5pt; /* 信息栏(blockquote)字体大小 */
/* 字体 */
--text-font: 'SourceHanSansCN'; /* 文本字体 */
--title-font: 'SourceHanSansCN'; /* 标题字体(Serif 风格为 'SourceHanSerifCN') */
--link-font: 'JetBrainsMono'; /* 链接字体 */
--code-font: 'JetBrainsMono'; /* 代码字体 */
/* 色彩 */
--color-accent: #4870ad; /* 主题色 */
--text-normal: #353a42; /* 文本颜色,若需打印请改为纯黑 */
--link-color: var(--color-accent); /* 链接颜色 */
以上为 Classic(lapis-cv.css)的默认值;Serif 风格(lapis-cv-serif.css)的差异在于更紧凑的字号(正文 9.5pt、H1 25pt)以及标题字体使用思源宋体 SourceHanSerifCN,见 styles/serif/typora.css。
5.2 修改变量的入口
自定义样式时,直接编辑对应编辑器加载的样式文件:
- Typora:
设置 > 外观 > 打开主题文件夹,编辑lapis-cv.css/lapis-cv-serif.css; - VSCode:编辑解压目录内
lapis-cv/styles下的样式文件; - Obsidian:
设置 > 外观 > CSS 代码片段 > 右侧按钮 - 打开代码片段文件夹。
例如内容较多需要压缩篇幅时,可整体下调 --text-size 与 --line-height;需要打印时,将 --text-normal 改为纯黑(#000)以保证印刷清晰。部分样式修改后需要重启编辑器才能生效。
5.3 打印媒体适配
styles/main.css 中还包含 @media print 规则:所有标题设置 page-break-after: avoid,避免标题出现在页面底部孤立行;hr 在打印时强制分页(page-break-after: always 且隐藏自身)——这正是下一节分页功能的样式基础。
六、Typora 导出 PDF 的完整配置
6.1 主题安装
在 Typora 中使用该模板需先安装主题(步骤源自 README.md):
- 下载 Release 压缩包并解压;
- 打开 Typora 主题文件夹:
设置 > 外观 > 打开主题文件夹; - 将
lapis-cv.css、lapis-cv-serif.css及lapis-cv目录复制进主题文件夹; - 重启 Typora,在主题菜单中选择
Lapis Cv(经典风格)或Lapis Cv Serif(衬线风格)。
6.2 页面与页边距
导出 PDF 前需在 设置 > 导出 > PDF 中设置:页面大小 A4,页边距自定义,上下 13mm、左右 15mm,保证版式与样式中的 mm 单位计算一致:
6.3 分页与页码
- 分页:在需要分页的位置插入
---分隔线即可。样式层面对应hr的打印规则(分页且隐藏线条)。 - 页码:在
设置 > 导出 > PDF中设置页脚模板,例如${pageNo} / ${totalPages}即可输出 "1 / 2" 形式的页码。
七、从源码构建与双风格主题
仓库根目录的 Makefile 定义了完整的构建流程,可从源码直接产出三个编辑器的发布包:
git clone https://gitcode.com/gh_mirrors/la/LapisCV
cd LapisCV
make
ls build
make 默认执行 all 目标,分别构建 build/obsidian、build/typora、build/vscode 三个目录。其中 Typora 包的产物结构为:
build/typora/lapis-cv.css(Classic 主题,由 styles/classic/typora.css 生成)build/typora/lapis-cv-serif.css(Serif 主题,由 styles/serif/typora.css 生成)build/typora/lapis-cv/styles/main.css(核心样式)build/typora/lapis-cv/fonts/(字体资源)
字体资源(fonts/ 目录)包括:思源黑体 SourceHanSansCN(Regular/Bold/Medium)、思源宋体 SourceHanSerifCN-Bold、等宽字体 JetBrainsMono-Regular,以及图标字体 iconfont.ttf。所有字体已随主题打包,无需用户额外安装。
八、中英文模板对照与适用场景
英文模板 templates/typora/template-en.md 与中文模板 templates/typora/template-cn.md 结构完全一致,仅正文语言与内容示例不同:
- 英文模板使用"段落总述 + 要点列表"的国际通用写法,时间格式为
March 2008 - July 2009,适合外企、英文技术岗位、GitHub 求职场景; - 中文模板(
templates/typora/template-cn.md)采用中文标题(教育经历 / 工作经验 / 项目经历 / 专业技能),时间格式为2008.03 - 2009.07,适合国内投递场景。
由于两者共用同一套 CSS 变量与图标体系,切换语言只需替换模板文件本身,样式无需任何改动。配合 VSCode(Markdown PDF 插件)与 Obsidian(Vault 直开)的同构模板,可实现"一份 Markdown,三端通用"的简历维护方式。
结语
template-en.md 虽然只是一个 67 行的 Markdown 模板,却是理解 LapisCV 整套排版体系的钥匙:blockquote 信息栏、entry-title 两端对齐、转义 Unicode 图标、CSS 变量驱动的字号/行距/色彩,以及 --- 分页与打印媒体规则,共同构成了一个可直接产出 PDF 的完整简历工作流。理解这些标记与样式机制后,你既能用默认样式快速出片,也能通过修改变量精细控制每一处版式细节。

