My personal website built with Gatsbyjs
Create an .env
file with the following environment variables (see the .env.sample
):
- CONTENTFUL_SPACE_ID
- CONTENTFUL_ACCESS_TOKEN
- GOOGLE_ANALYTICS
Install gatsby-cli
globally to use it easily:
npm install -global gatsby-cli
Install all dependencies:
npm install
Start the development server:
gatsby develop
For the 404 page and the rss.xml:
gatsby build && gatsby serve public
Install surge
globally to use it easily (once):
npm install --global surge
Build it:
gatsby build
Deploy it on surge:
surge public/
Feel free to copy any code you like and don't forget to:
- Use you own environment variables
- Use your own CNAME file with your own domain
- Use your own redirects
- Use your own pages, images, files etc.
Some specs to remember especially with respect to images.
- Thumbnail size for contentful: 240x135 (16:9)
In Contentful don't try embed.ly embeds in the long text properties. Just copy-paste the iframe.