Skip to content

A responsive, minimal, print-friendly resume builder. Powered by Hugo, Tailwind CSS, Nix, and GitHub Pages.

License

Notifications You must be signed in to change notification settings

cjshearer/modern-hugo-resume

Repository files navigation

modern-hugo-resume

A responsive, minimal, print-friendly resume builder. Powered by Hugo, Tailwind CSS, Nix, and GitHub Pages.

Host your own resume on GitHub for free!

Quick Start

This guide helps you quickly test the theme and deploy your resume to github pages. If you like it, we suggest continuing with the Extended Setup.

1. Fork this repository

Fork this repository, naming it <your_username>.github.io.

2. Allow GitHub Actions to Deploy to GitHub Pages

Under (your repo) > Settings > Pages > Build and Deployment > Source, select "GitHub Actions" as the source.

3. Enable GitHub Actions Workflows

Go to (your repo) > Actions and click "Enable workflows". These are disabled by default on forks, to prevent unintended workflow runs.

4. Deploy your Customized Resume

Edit the resume at (your repo) > exampleSite/content/_index.md using the github editor. When you commit it, the resume site will automatically be built and deployed to https://<your_username>.github.io.

Tip

You can skip editing the resume and trigger the build and deploy workflow manually by going to Actions > ./github/workflows/deploy.yaml and clicking "run workflow".

Extended Setup

The fork you created in the Quick Start contains a copy of the theme, which won't be easy to update. Follow this guide to convert your forked hugo site into one which imports the theme.

5. Remove Theme Source Code

Clone your forked repository and modify it as follows:

  1. Delete files and folders marked with a (-).
  2. Moving the files from exampleSite up a level with mv exampleSite/* . (ignore the error).
 $ tree -av --dirsfirst -L 1 --gitignore
  .
  ├── .git
  ├── .github
  ├── .vscode
- ├── assets
+ ├── exampleSite/* # move its files to the root dir
- ├── layouts
  ├── .envrc
  ├── .gitignore
  ├── LICENSE
  ├── README.md
  ├── biome.json
  ├── flake.lock
  ├── flake.nix
- ├── go.mod
- ├── go.sum
- ├── hugo.toml
- ├── package.hugo.json
- ├── postcss.config.js
- └── tailwind.config.js

6. Rename your Hugo Module and Import Theme

Rename your module and remove the replacement directive to change modern-hugo-resume from a local to a remote dependency:

// go.mod (originally from `exampleSite/go.mod`)
- module github.com/cjshearer/modern-hugo-resume/exampleSite
+ module github.com/<your username>/<your repo>

- // We use this for local development. Remove it if you're
- // extracting the exampleSite to your own repository.
- replace github.com/cjshearer/modern-hugo-resume => ../

7. Update Build Path, Name, and Dependency Hash

GitHub Actions is configured to build the site using Nix. Now that your site is built from the root directory (not exampleSite), you should update its build path and name.

Nix also requires the expected hash of downloaded dependencies. Now that modern-hugo-resume is imported, you will need to update this hash. Follow the instructions above outputHash in flake.nix.

See cjshearer.dev/flake.nix for reference.

# flake.nix
- buildFolder = "exampleSite";
+ buildFolder = ".";
...
- pname = "modern-hugo-resume-exampleSite"
+ pname = "<your username>.github.io"
...
- outputHash = "sha256-someOldHash=
+ outputHash = "sha256-someNewHash=

8. Commit and Push

Commit and push your changes to your main branch.

git add .
git commit -m "build: use hugo module"
git push

Local Development

Requirements

These can be installed manually, or automatically with nix by running nix develop:

  1. Install hugo 1.27.0+extended.
  2. Install go >= 1.22.3.
  3. Install node >= 20.2.0 with nvm.
  4. Install pnpm with corepack enable.
  5. Run pnpm install within exampleSite.

Common Commands

nix develop     # open a development environment, with all requirements satisfied
nix build       # build the production site, exactly the same way it's done in CI
nix flake check # run formatter/linter checks, exactly the same way it's done in CI

hugo server     # serve to localhost and rebuild changes automatically
hugo --minify   # build static site for production