Awesome Open Source
Awesome Open Source

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
    

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,508,638
Styled Components (3,549
Gatsby (3,086
Hooks (2,832
Netlify (2,009
Responsive (1,581
Google Analytics (552
Mdx (425
Algolia (293
Disqus (133
Related Projects