Skip to content

janosh/blog

main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

janosh.dev

The code for my personal blog. I use it to write about physics, machine learning, sustainability and web development.

The site is fully responsive, built with Gatsby, has fluid typography, relies heavily on React Hooks for stateful function components and CSS grid for layout. It uses the following libraries:

Feel free to reuse the whole or any part of this repo to create your own Gatsby site.

Installation

To get this site running locally, you need to have installed git, gatsby-cli and yarn (or npm). Then follow these steps:

  1. Clone the repo to your machine and change into its directory.

    git clone https://github.com/janosh/blog \
    && cd blog
  2. Optionally setup git hooks (recommended if you intend to open a PR).

    git config core.hooksPath src/utils/gitHooks \
    && chmod -R u+x src/utils/gitHooks
  3. Install dependencies.

    yarn
  4. Start the dev server. This may take a while on initial compilation since the site uses quite a lot of images which Gatsby creates thumbnails of and then caches.

    gatsby develop

Deployment

The easiest way to get this site published is as follows:

  1. Create an account with netlify.

  2. Install the netlify-cli.

  3. Login to your account.

    netlify login
  4. Connect your GitHub repo with your netlify account for continuous deployment.

    netlify init
  5. Finally deploy the site with

    netlify deploy