Getting Started with Gatsby
github site for Gatsby
Files as Pages
adding pages is as simple as adding a file to the directory ‘pages’, adding a directories also works fine.
- markdown
- simple quick way to write a page of mostly text.
- information on markdown from github
- quick reference sheet
- react component
- great way to add more complex pages or pages with logic in them.
- official documentation on react
- quick reference sheet
starting a Gatsby site
- Install:
npm install -g gatsby - generate project:
gatsby new [SITE_DIRECTORY] [URL_OF_STARTER]- if URL_OF_STARTER is left blank default is used.
- default starter:
https://github.com/gatsbyjs/gatsby-starter-default - minimal starter:
https://github.com/brianstone/gatsby-starter-clean
- startup the development server:
gatsby develop - do all your edits etc.
- when ready to serve your site.
gatsby build- all the static files for the site should not be in the
publicsub-folder.
