-
Clone the repository
Use the git CLI to clone the repository.
git clone git@github.com:nextlevelshit/nls-gatsby-thfradio.git
-
Download dependencies
yarn # OR npm install
-
Start developing
Navigate into your new site’s directory and start it up.
yarn start ## OR gatsby develop ## OR ./node_modules/gatsby-cli/lib/index.js develop
-
Open the source code and start editing!
Your site is now running at
http://localhost:8000
!Note: You'll also see a second link:
http://localhost:8000/___graphql
. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.Open the
gatsby-starter-uno
directory in your code editor of choice and editsrc/pages/index.js
. Save your changes and the browser will update in real time! -
Built time
If you want to serve our repository, you will have to build the repository and point your domain to the
/public
folder.yarn build ## OR rm -rf .cache && rm -rf public && gatsby build ## OR rm -rf .cache && rm -rf public && ./node_modules/gatsby-cli/lib/index.js build
A quick look at the top-level files and directories you'll see in a Gatsby project.
.
├── data
├── markdown
└── yaml
├── node_modules
├── public
└── src
├── atoms
├── fonts
├── images
├── molecules
├── organisms
├── pages
├── styles
├── templates
└── layout.js
├── .gitignore
├── gatsby-config.js
├── gatsby-node.js
├── package.json
├── README.md
├── tailwind.config.js
└── yarn.lock
-
/data
: This directory contains all static content including your markdown files.3.1.
/data/markdown
: This directory includes all routable markdown files. Mind to add aslug
parameter into the frontmatter of each file, otherwise it won't get a route.3.2.
/data/yaml
: All other static content can be provided through these YAML files. They are easily queryable with GraphQL. -
/node_modules
: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed. -
/src
: This directory will contain all the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template.src
is a convention for „source code”.3.1.
/src/atoms
: This directory contains reuasable components that you can implement on purpose. They run as stand-alone and do not have any dependencies to other modules, components or pages. Some are organized in directories, if you include some styling.3.2.
/src/fonts
: This directory contains all font family files, that are used on your webpage.3.3.
/src/images
: This direcotry contains (for now) all the images used for your website.3.4.
/src/molecules
: This directory contains reuasable components that you can implement on purpose. They are mostly built on top of some gathered components from thesrc/atoms
folder.3.5.
/src/organisms
: This directory contains reuasable components that you can implement on purpose. They are mostly built on top of some gathered components from thesrc/molecules
folder.3.6.
/src/pages
: This directory contains allisCreatedByStatefulCreatePages
labeled files. If you want to add manually a specific route, add a file into this folder. Otherwise there is mostly the404.js
andindex.js
files included.3.7.
/src/styles
: This directory contains the main part of your styles, defines CSS variables and imports the tailwind functionality. All global stylings that are not connected to a specific component (see above) come here.3.8.
/src/templates
: This directory contains templates which are helpful to generate routable pages inside ofgatsby-node.js
.3.9.
/src/layout.js
: This file holds the complete template of our website. All templates are based on top of this file. -
.gitignore
: This file tells git which files it should not track / not maintain a version history for. -
gatsby-config.js
: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the config docs for more detail). -
gatsby-node.js
: This file is where Gatsby expects to find any usage of the Gatsby Node APIs (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process. -
gatsby-ssr.js
: This file is where Gatsby expects to find any usage of the Gatsby server-side rendering APIs (if any). These allow customization of default Gatsby settings affecting server-side rendering. -
package.json
: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc). This manifest is how npm knows which packages to install for your project. -
README.md
: A text file containing useful reference information about our project. -
tailwind.config.js
: A configuration file for changing the default styling parameters for Tailwind CSS. General styling adaptions should be done inside this file instead of overwriting everything in the SCSS files or component styles. -
yarn.lock
(Seepackage.json
above, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. (You won’t and shouldn't change this file manually).
This repository is maintained by Michael Czechowski in 2020. If you're having any questions, don't hesitate to write an email.