Skip to content

Commit

Permalink
feat: add theme as hugo module
Browse files Browse the repository at this point in the history
  • Loading branch information
cjshearer committed Jun 22, 2024
1 parent 1b18f7a commit f9eb337
Show file tree
Hide file tree
Showing 34 changed files with 1,719 additions and 3,078 deletions.
2 changes: 0 additions & 2 deletions .commitlintrc.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .github/actions/setup-runner/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ runs:
steps:
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- uses: DeterminateSystems/flake-checker-action@v8
4 changes: 1 addition & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ jobs:
id: pages
uses: actions/configure-pages@v5
- name: Build
# HACK: https://github.com/NixOS/nix/issues/5663#issuecomment-2010521981
# see baseURL input in flake.nix for more details
run: nix build --override-input baseURL file+file://<(printf %s "${{ steps.pages.outputs.base_url }}")
run: nix build
- if: github.ref == 'refs/heads/main'
name: Upload Artifact
uses: actions/upload-pages-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yaml → .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-runner
- name: Check Linting and Formatting
shell: bash
run: nix develop .#default --command bash -c "pnpm format:check && pnpm lint"
- uses: DeterminateSystems/flake-checker-action@v8
- shell: bash
run: nix flake check
4 changes: 3 additions & 1 deletion .gitignore
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 removed .hugo_build.lock
Empty file.
11 changes: 0 additions & 11 deletions .prettierignore

This file was deleted.

8 changes: 0 additions & 8 deletions .prettierrc.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions .stylelintrc.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "stylelint.vscode-stylelint"]
"recommendations": ["biomejs.biome"]
}
19 changes: 5 additions & 14 deletions .vscode/settings.json
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
}
121 changes: 101 additions & 20 deletions README.md
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
```
27 changes: 27 additions & 0 deletions biome.json
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
}
}
78 changes: 38 additions & 40 deletions content/_index.md → exampleSite/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Software Developer
description: Full Stack Software Developer Resume
faviconText: 💼
layout: modern-hugo-resume
---

<header class="mb-4 text-center md:text-left print:text-left">
Expand All @@ -14,7 +15,6 @@ faviconText: 💼
Software Developer with 3 Years of Experience in Full Stack Web and Mobile Development
{ class="mb-2"}

<!-- prettier-ignore -->
- [![](svgs/brands/github.svg)cjshearer](https://github.com/cjshearer "My GithHub")
- [![](svgs/brands/linkedin.svg)in/cjshearer](https://linkedin.com/in/cjshearer "My LinkedIn")
- [![](svgs/solid/house.svg)cjshearer.dev](https://cjshearer.dev "My Website")
Expand All @@ -27,51 +27,49 @@ Software Developer with 3 Years of Experience in Full Stack Web and Mobile Devel

## Skills {class="md:hidden"}

<!-- for some reason, classes aren't applied without this extra spacing -->
<!-- prettier-ignore -->
- Languages:
- TypeScript
- JavaScript
- HTML
- CSS
- Golang
- Node.js
- SQL
- Rust
- Python
- Java
- C++
- TypeScript
- JavaScript
- HTML
- CSS
- Golang
- Node.js
- SQL
- Rust
- Python
- Java
- C++
- Frameworks:
- React
- React-Native
- Vue
- Nuxt
- Hugo
- TailwindCSS
- Storybook
- React
- React-Native
- Vue
- Nuxt
- Hugo
- TailwindCSS
- Storybook
- Concepts:
- Agile (Scrum)
- RESTful APIs
- Material Design
- Cloud Native
- GitOps
- CI/CD
- Agile (Scrum)
- RESTful APIs
- Material Design
- Cloud Native
- GitOps
- CI/CD
- Tools:
- Git
- Linux
- Docker
- Tailscale
- Postman
- Git
- Linux
- Docker
- Tailscale
- Postman
- Databases:
- MySQL
- PostgreSQL
- MongoDB
- MySQL
- PostgreSQL
- MongoDB
- Services:
- Auth0
- LogRocket
- Sentry
- Stripe
- SendGrid
- Auth0
- LogRocket
- Sentry
- Stripe
- SendGrid
{ class="max-md:skills-table md:float-right [&>li]:list-none print:md:float-none"}

## Experience
Expand Down
File renamed without changes
5 changes: 5 additions & 0 deletions exampleSite/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/cjshearer/modern-hugo-resume/exampleSite

go 1.22.3

require github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7 // indirect
Loading

0 comments on commit f9eb337

Please sign in to comment.