This is a set of notes to help me quickly reference things I find useful. I hope it helps out other developers as well!
Table of Contents will be published soon!
-
Install Node.js from here (the current version is fine - 9.8.0 as of 3-12-2018)
-
Install the GatsbyJS CLI by running the following command in your shell
npm install --global gatsby-cli -
Clone the repository to your location of choice
git clone [email protected]:NoahLE/Developer-Notes.git(feel free to fork as well) -
CD into the project's root directory and run
gatsby developto start testing! You should be able to access the website atlocalhost:8000in your browser
gatsby develop— Gatsby will start a hot-reloading development environment accessible at localhost:8000gatsby build— Gatsby will perform an optimized production build for your site generating static HTML and per-route JavaScript code bundles.gatsby serve— Gatsby starts a local HTML server for testing your built site.
Here is a quick breakdown of this project's structure.
The content for all the pages is located in the content folder. I tried to set up a structure of main category -> sub-category (if needed) -> page. Ideally the depth of pages won't be more than three levels deep.
These components are written in React and control the structure and appearance of the website.
layouts- The skeleton layout of the websitepages- Controls the structure of each pagetemplates- Has the layout for each postutils- Has the formatting options, such as the font
gatsby-config.js- Controls Gatsby's pluginsgatsby-node.js- Controls page creation