This repo powers the Gatsby site janosh.io. I use it to write about personal interests. Mostly theoretical physics, machine learning, sustainability and web development.
The site is fully responsive, has fluid typography, relies heavily on React Hooks for stateful components and CSS grid for layout. It uses the following libraries:
- MDX for immersive, interactive content
- styled-components for design
- KaTeX for typesetting math
- gatsby-remark-vscode for syntax highlighting
- Disqus for blog post comments
- Algolia for custom search
- react-spring for animations
Feel free to reuse the whole or any part of this repo to create your own Gatsby site.
To get this site running locally, you need git
, gatsby-cli
and yarn
(or npm
). Then follow these steps:
-
Clone the repo to your machine and change into its directory.
git clone https://github.com/janosh/janosh.io && cd janosh.io && git config core.hooksPath src/utils/gitHooks && chmod +x src/utils/gitHooks/pre-commit
-
Install dependencies.
yarn
-
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
The easiest way to get this site published is as follows:
-
Create an account with netlify.
-
Install the
netlify-cli
. -
Login to your account.
netlify login
-
Connect your GitHub repo with your netlify account for continuous deployment.
netlify init
-
Finally deploy the site with
netlify deploy