项目作者: jack-r-warren

项目描述 :
My own personal website, built with React, Gatsby, Sass, and Remark
高级语言: JavaScript
项目地址: git://github.com/jack-r-warren/jackwarren-info.git
创建时间: 2019-12-25T02:28:11Z
项目社区:https://github.com/jack-r-warren/jackwarren-info

开源协议:Other

下载


jackwarren.info

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:

  1. URL=http://localhost:8000
  2. 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:

```shell script
npm install -g gatsby-cli

  1. Clone down this repository:
  2. ```shell script
  3. git clone git@github.com:jack-r-warren/jackwarren-info.git

For local development, run the development server:

```shell script
npm run develop

  1. To make the development server available on your local network (assuming your firewall allows access to port 8000):
  2. ```shell script
  3. npm run develop -- --host=0.0.0.0

To make a production build:

shell script 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.