aboutsummaryrefslogtreecommitdiff

CV

My CV in JSON format based on https://jsonresume.org/.

Preview of CV online

Where does it end up?

  1. On [cv.alifeee.co.uk]
  2. On the json-resume registry (via the gist)
  3. PDF on the releases page or website

Changing the theme

A list of themes can be found at https://jsonresume.org/themes/. You can try them by visiting the JSON resume registry. The theme can be changed via the theme query parameter, e.g.:

https://registry.jsonresume.org/alifeee?theme=even

Development

Install dependencies

bun install

(in a separate folder) to install Chrome with Puppeteer (does not install with Bun)

npm install puppeteer

Test

bun test

Spellcheck

bunx cspell "cv.json"

Build HTML

bun build-html.ts

Build PDF

bun build-pdf.ts

Develop HTML with hot reload

Hot reload is on any files imported, which are template.txt and cv.json. The template is a .txt as this can be imported into Bun natively, whereas other extensions require some typescript magic to be imported.

Note that hot reload does not work with Windows files. The repository must exist on a Linux filesystem.

To do this on Windows, open \\wsl.localhost\Ubuntu\home\<user> with Explorer and open VSCode via the context menu. WSL can be used via the console window. This way, hot reload works in Bun.

Using it like this, sometimes VSCode's file explorer does not refresh properly.

bun --hot index.ts

GitHub Actions

See the files themselves for more details.

Action Description
[test.yml] Runs on pull request and push to main. Verifies that the resume.json conforms to the json-resume schema, JS tests pass, and runs spellcheck
[publish.yml] Runs on release (or tag). Builds the HTML and PDF, then pushes to: releases page; and [publish branch] (viewable on my GitHub pages).
[gist.yml] Runs on release (or tag). Updates the resume gist if resume.json has changed.