Skip to content

My own personal website, built with React, Gatsby, Sass, and Remark

License

Notifications You must be signed in to change notification settings

jack-r-warren/jackwarren-info

Repository files navigation

netlify status

Language grade: JavaScript code style: prettier Dependabot Status Dependency status

This is the codebase behind my personal website.

This site is fully copyrighted by Jack Warren; more information is available in the LICENSE file.

Configuration

Environment Variables

  • URL - The base URL of the website, with the leading protocol and without the trailing slash
    • Set automatically by Netlify during deployment
    • Defaults to https://jackwarren.info
  • CONTEXT - The context for building
  • DEPLOY_PRIME_URL - The specific URL of the deployment
    • Set automatically by Netlify during deployment
    • Only used if the CONTEXT is not development or production
    • Can be ignored for development purposes (used automatically in Netliy branch deployments and deployment previews)

Dotenv is configured in this project and it is the recommended way to set these variables.

For a local development environment, create a .env file at the root of the project containing the following:

URL=http://localhost:8000
CONTEXT=development

GraphQL

The GraphQL endpoint is only available during development/rendering.

The .graphqlconfig assumes the schema will be available at Gatsby's development-time default of http://localhost:8000/___graphql.

Running

You'll need Node.js, npm, and Git.

Install the Gatsby CLI if you don't have it already:

npm install -g gatsby-cli

Clone down this repository:

git clone [email protected]:jack-r-warren/jackwarren-info.git

For local development, run the development server:

npm run develop

To make the development server available on your local network (assuming your firewall allows access to port 8000):

npm run develop -- --host=0.0.0.0

To make a production build:

npm run build

Tooling

Prettier is used for code formatting, and is called by the format npm task.

Husky is used to run pretty-quick before all commits.

Stylelint is used for additional SCSS linting.