-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit exposes the theme as a hugo module that can be imported into other hugo websites. As a part of this change, it moves the example of the website to a standard `exampleSite`. Another change that comes with this commit is the transition of all linting and formatting tools/checks away from node, towards tools that are installed and used with nix. This is done primarily because consumers of the theme will need to download the same node dependencies as our repo has, and I don't want there to be any extraneous dependencies that are purely used for managing this repository. resolves #34
- Loading branch information
Showing
35 changed files
with
1,728 additions
and
3,087 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup-runner | ||
- uses: DeterminateSystems/flake-checker-action@v8 | ||
- shell: bash | ||
run: nix flake check |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
build | ||
result | ||
public | ||
resources | ||
node_modules | ||
hugo_stats.json | ||
.hugo_build.lock | ||
|
||
*.crt | ||
*.key | ||
|
||
.direnv | ||
.pre-commit-config.yaml | ||
result |
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"recommendations": ["dbaeumer.vscode-eslint", "stylelint.vscode-stylelint"] | ||
"recommendations": ["biomejs.biome"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
{ | ||
"[nix]": { | ||
"editor.defaultFormatter": "jnoortheen.nix-ide" | ||
}, | ||
"css.validate": false, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit" | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"eslint.format.enable": true, | ||
"eslint.rules.customizations": [ | ||
{ | ||
"rule": "*", | ||
"severity": "warn" | ||
} | ||
], | ||
"stylelint.configFile": ".stylelintrc.yaml", | ||
"stylelint.validate": ["css"], | ||
"[nix]": { | ||
"editor.defaultFormatter": "jnoortheen.nix-ide" | ||
} | ||
"editor.defaultFormatter": "biomejs.biome", | ||
"editor.formatOnSave": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,120 @@ | ||
# modern-hugo-resume | ||
|
||
_A minimal static resume builder; inspired by [sproogen's modern-resume-theme](https://github.com/sproogen/modern-resume-theme) and [mnjul's html-resume](https://github.com/mnjul/html-resume). Powered by Hugo, Tailwind CSS, and GitHub Pages._ | ||
A responsive, minimal, print-friendly resume builder. Fork it as a standalone website, or use as a theme in a new or existing Hugo site. Powered by Hugo, Tailwind CSS, Nix, and GitHub Pages. | ||
|
||
_Host your own resume on GitHub for free!_ | ||
|
||
## Setup | ||
## Requirements | ||
|
||
### Remote Repository | ||
Can be installed manually, or with `nix develop`: | ||
|
||
1. [Fork](https://github.com/cjshearer/modern-hugo-resume/fork) this repository, naming it `<your_username>.github.io`. | ||
2. In your new repository, go to `Settings > Pages` and under "Build and deployment" select "GitHub Actions" as the source. | ||
3. Go to `Actions` and click "Enable workflows". When you next push to the `main` branch of your repository, the resume site will automatically be built and deployed to `https://<your_username>.github.io`. | ||
1. Install [`hugo`](https://gohugo.io/installation/) 1.27.0+extended. | ||
2. Install [`go`](https://go.dev/dl/) >= 1.22.3. | ||
3. Install `node` >= 20.2.0 with [nvm](https://github.com/nvm-sh/nvm). | ||
4. Install `pnpm` with `corepack enable`. | ||
5. Run `pnpm install`. | ||
|
||
## Quick Start | ||
|
||
Follow this guide to quickly deploy your resume to github pages. | ||
|
||
### 1. Fork this repository | ||
|
||
[Fork this repository](https://github.com/cjshearer/modern-hugo-resume/fork), 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. Edit the Resume to Deploy the Site | ||
|
||
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 also trigger the workflow to build and deploy the website by going to `Actions > ./github/workflows/deploy.yaml` and clicking "run workflow". | ||
> 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". | ||
### Local Repository | ||
## Minimal Setup | ||
|
||
#### With [Nix](https://nixos.org/download/) | ||
Follow this guide if you want to handle deployment yourself. | ||
|
||
Run `nix develop` (or install [nix-direnv](https://github.com/nix-community/nix-direnv)). | ||
> [!TIP] | ||
> Feel free to adapt our nix-based `.github` workflows to your website. An example of this will be available on my [my website's repo](https://github.com/cjshearer/cjshearer.dev). | ||
#### Without Nix | ||
### 1. Create and Clone Your New Repository | ||
|
||
1. Install [`hugo`](https://gohugo.io/installation/) 1.27.0+extended. | ||
2. Install `node` >= 20.2.0 with [nvm](https://github.com/nvm-sh/nvm). | ||
3. Install `pnpm` with `corepack enable`. | ||
4. Run `pnpm install`. | ||
[Create a new repository](https://github.com/new), naming it `<your_username>.github.io` and cloning it locally. | ||
|
||
### 2. Initialize a Hugo Module | ||
|
||
Inside your local git repository, create a `go.mod` file with: | ||
|
||
```sh | ||
hugo mod init github.com/<your username>/<your repo name> | ||
``` | ||
|
||
### 3. Import this Theme | ||
|
||
Copy our `exampleSite/hugo.toml` to your repo's root directory, deleting the `replacements` line and editing the `baseURL`. | ||
|
||
```diff | ||
- baseURL = "https://cjshearer.github.io/modern-hugo-resume" | ||
+ baseURL = "https://<your_username>.github.io/<your_repo_name>" | ||
... | ||
[module] | ||
- replacements = "github.com/cjshearer/modern-hugo-resume -> ../.." | ||
|
||
[[module.imports]] | ||
path = "github.com/cjshearer/modern-hugo-resume" | ||
... | ||
``` | ||
|
||
### 4. Install Node Dependencies | ||
|
||
Some of our dependencies (e.g. `tailwindcss`) are sourced from `npm`. Generate a `package.json` for these dependencies and install them with your preferred node package manager: | ||
|
||
```sh | ||
hugo mod npm pack | ||
pnpm install | ||
``` | ||
|
||
### 5. Write your Resume | ||
|
||
Add your resume as a markdown file located in `content/_index.md`. See `exampleSite/content/_index.md` for an example. Be sure to include the frontmatter: | ||
```yaml | ||
--- | ||
title: Software Developer | ||
description: Full Stack Software Developer Resume | ||
faviconText: 💼 | ||
layout: modern-hugo-resume | ||
--- | ||
``` | ||
|
||
### 6. Run your Site | ||
|
||
```sh | ||
hugo server | ||
``` | ||
|
||
## Local Development | ||
|
||
## Development | ||
Development of this repository uses the following commands frequently. | ||
|
||
### Rebuild on file change | ||
### Common Nix Commands | ||
```sh | ||
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 | ||
nix develop # open a development environment with requirements satisfied | ||
``` | ||
|
||
To rebuild changes automatically, run `pnpm dev`. | ||
#### Common pnpm Commands | ||
|
||
### Build | ||
```sh | ||
cd exampleSite # <- don't forget this | ||
|
||
To create a production build, run `pnpm build`. | ||
pnpm dev # rebuild changes automatically | ||
pnpm build # create a production build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json", | ||
"css": { | ||
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "space" | ||
} | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"formatWithErrors": false, | ||
"indentStyle": "space", | ||
"lineWidth": 100 | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
}, | ||
"vcs": { | ||
"clientKind": "git", | ||
"defaultBranch": "main", | ||
"enabled": true, | ||
"useIgnoreFile": true | ||
} | ||
} |
Oops, something went wrong.