-
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.
- Loading branch information
Showing
15 changed files
with
2,218 additions
and
2,310 deletions.
There are no files selected for viewing
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 @@ | ||
use flake |
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
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
build | ||
result | ||
public | ||
resources | ||
node_modules | ||
hugo_stats.json | ||
|
||
*.crt | ||
*.key | ||
*.key | ||
|
||
.direnv |
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 |
---|---|---|
@@ -1,18 +1,20 @@ | ||
{ | ||
"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" | ||
} | ||
], | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"eslint.format.enable": true, | ||
"css.validate": false, | ||
"stylelint.configFile": ".stylelintrc.yaml", | ||
"stylelint.validate": ["css"], | ||
"yaml.schemaStore.enable": false | ||
"[nix]": { | ||
"editor.defaultFormatter": "jnoortheen.nix-ide" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -4,72 +4,36 @@ _A minimal static resume builder; inspired by [sproogen's modern-resume-theme](h | |
|
||
_Host your own resume on GitHub for free!_ | ||
|
||
## Repository Setup | ||
## Setup | ||
|
||
### Remote Repository | ||
|
||
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 update the `main` branch of your repository with your information, the resume will automatically be built and deployed to `https://<your_username>.github.io`. | ||
|
||
4. [optional] If you just want to see the page deployed now, without updating the resume content, you can manually trigger the build and deploy workflow by going to `Actions > ./github/workflows/deploy.yaml` and clicking "run workflow". | ||
|
||
## Local Usage | ||
|
||
### Prerequisites | ||
|
||
#### Node | ||
|
||
We recommend installing the latest version (or at least 16) of Node with [nvm](https://github.com/nvm-sh/nvm). | ||
|
||
[Windows]: You'll need to use [nvm-windows](https://github.com/coreybutler/nvm-windows) if you want to use nvm. | ||
|
||
#### Git | ||
|
||
You probably already have this. | ||
|
||
[Windows]: Install with `winget install -e --id Git.Git` | ||
|
||
### Setup | ||
|
||
Clone the repository: | ||
|
||
```sh | ||
git clone [email protected]:<your_username>/<your_username>.github.io.git | ||
``` | ||
|
||
We use [corepack](https://nodejs.org/api/corepack.html) (comes with Node >= 16) | ||
to manage `pnpm`. To install, run the following from the project's root | ||
directory. | ||
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`. | ||
|
||
[Windows]: You may need to run the following with elevated privileges. For a convenient way to do this, install gsudo with `winget install -e --id gerardog.gsudo` and prepend `gsudo` to the following command: | ||
> [!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". | ||
```sh | ||
corepack enable | ||
``` | ||
### Local Repository | ||
|
||
To install the project dependencies, run the following command from the project's root directory: | ||
#### With [Nix](https://nixos.org/download/) | ||
|
||
```sh | ||
pnpm install | ||
``` | ||
Run `nix develop` (or install [nix-direnv](https://github.com/nix-community/nix-direnv)). | ||
|
||
## Local Development | ||
#### Without Nix | ||
|
||
To make changes and instantly see them at http://localhost:1313, run: | ||
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`. | ||
|
||
```sh | ||
pnpm dev | ||
``` | ||
## Development | ||
|
||
To make the server accessible over tailscale, run | ||
### Rebuild on file change | ||
|
||
```sh | ||
pnpm dev:tailscale | ||
``` | ||
To rebuild changes automatically, run `pnpm dev`. | ||
|
||
To create a production build, run: | ||
### Build | ||
|
||
```sh | ||
pnpm build | ||
``` | ||
To create a production build, run `pnpm build`. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
description = "modern-hugo-resume"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
|
||
# HACK: enable build argument with https://github.com/NixOS/nix/issues/5663#issuecomment-2010521981 | ||
baseURL.url = "file+file:///dev/null"; | ||
baseURL.flake = false; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils, baseURL }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
hugo = pkgs.hugo; | ||
nodejs = pkgs.nodejs_22; | ||
pnpm = pkgs.pnpm; | ||
nativeBuildInputs = [ nodejs hugo pnpm ]; | ||
in | ||
{ | ||
packages.default = pkgs.stdenv.mkDerivation (finalAttrs: { | ||
pname = "modern-hugo-resume"; | ||
name = finalAttrs.pname; | ||
|
||
src = ./.; | ||
|
||
nativeBuildInputs = nativeBuildInputs ++ [ pnpm.configHook ]; | ||
|
||
pnpmDeps = pnpm.fetchDeps { | ||
inherit (finalAttrs) pname src; | ||
hash = "sha256-LopdAXf7EScCbyXQ0op6xohdv6vRPdNQrVzIRxOvAG0="; | ||
}; | ||
|
||
postBuild = '' | ||
pnpm run build --baseURL=${builtins.readFile baseURL} | ||
''; | ||
|
||
installPhase = '' | ||
cp -r build $out | ||
''; | ||
}); | ||
|
||
devShell = pkgs.mkShell { inherit nativeBuildInputs; }; | ||
}); | ||
} |
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
Oops, something went wrong.