You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This portfolio site is designed to showcase my work and provide a way to contact me.
31
+
32
+
It uses [React] on top of the [Gatsby] framework for static site generation. At build time, it fetches repository data from the [GitHub API] to display a selection of my public repositories.
33
+
34
+
The UI is styled with [Tailwind CSS] and [daisyUI]. [TypeScript] is used for type checking, and [Biome.js] is used for linting and formatting. [gatsby-plugin-component-to-image] is used to dynamically generate social images from React components.
35
+
36
+
29
37
## Installation
30
38
### Prerequisites
31
-
32
-
-Node.js and NPM (see [nodejs.org](https://nodejs.org/) for more details)
33
-
-Yarn 4 (see the [Yarn docs](https://yarnpkg.com/getting-started/install)for more details)
39
+
-[Node.js]
40
+
-[Yarn 4]
41
+
-A [GitHub personal access token] (PAT) that can be used to access the GitHub API. This token should have public (read-only) access to all repositories as it is used to fetch repository data for the projects section.
34
42
35
43
### Setup
36
44
1. Clone the repo with `https://github.com/jerboa88/jerboa88.github.io.git`. Alternatively, you can download the repository as a zip file and extract it.
@@ -39,16 +47,39 @@
39
47
40
48
41
49
## Usage
42
-
We can build the site using the Gatsby CLI, which should have been installed with the install command above. All of the necessary commands are declared in `package.json` for convenience.
50
+
### Configuration
51
+
#### Required
52
+
The `GH_TOKEN` environment variable must be set to your GitHub PAT in order to fetch repository data, otherwise the build will fail. An easy way to do this is to create an `.env.development` or `.env.production` file in the project root like so:
53
+
54
+
```sh
55
+
# .env.development
56
+
GH_TOKEN=your_github_pat_here
57
+
```
58
+
59
+
The site is configured to fetch repository data from the `jerboa88` GitHub account by default, so if you want to fetch data for a different user, you will need to replace all instances of `jerboa88` in the code with your own username.
43
60
44
-
There are two ways to build & serve the site:
45
-
1. Use `yarn develop` to run the app in development mode. This will start the development server at [localhost:8000](https://localhost:8000) (by default). The project will automatically be rebuilt when changes are made.
61
+
#### Optional
62
+
Most of the site's configuration options are set in [src/common/constants.tsx] and [src/config/*.tsx].
46
63
47
-
2. Use `yarn build` to generate a production build of the app, then use `yarn serve` to serve it. The site can be viewed at [localhost:9000](https://localhost:9000) (by default).
48
64
65
+
### Building
66
+
We can build the site with the Gatsby CLI. All of the necessary commands are declared in `package.json` for convenience.
67
+
68
+
#### Development
69
+
Use `yarn develop` to run the app in development mode. This will start the development server at [localhost:8000] (by default). The project will automatically be rebuilt when changes are made.
70
+
71
+
#### Production
72
+
Use `yarn build` to generate a production build of the app, then use `yarn serve` to serve it. The site can be viewed at [localhost:9000] (by default).
73
+
74
+
75
+
### Other
49
76
`yarn clean` can be used to clear the local Gatsby cache if you encounter any issues with stale data/dependencies.
50
77
51
-
See the [Gatsby CLI docs](https://www.gatsbyjs.com/docs/reference/gatsby-cli/) for additional commands and options. You will likely have to prefix commands with `yarn` to make sure package resolution works properly. For example, the above `yarn develop` is actually just a shortcut for `yarn gatsby develop`.
78
+
`yarn typecheck` can be used to perform type checking using TypeScript.
79
+
80
+
`yarn lint` and `yarn format` can be used to apply linting and formatting fixes to the codebase using Biome.js.
81
+
82
+
See the [Gatsby CLI docs] for additional commands and options. To run an arbitrary command, prefix it with `yarn` (ex. `yarn gatsby repl`).
52
83
53
84
54
85
## Contributing
@@ -59,4 +90,24 @@ x.1 releases mark the final update for a given design, while x.0 releases are re
59
90
60
91
61
92
## License
62
-
This project is licensed under the MIT License. See [LICENSE](LICENSE) for details. This project includes various resources which carry their own copyright notices and license terms. See [LICENSE-THIRD-PARTY.md](LICENSE-THIRD-PARTY.md) for more details.
93
+
This project is licensed under the MIT License. See [LICENSE] for details. This project includes various resources which carry their own copyright notices and license terms. See [LICENSE-THIRD-PARTY.md] for more details.
0 commit comments