- JavaScript 93.7%
- Sass 6.3%
| .dependabot | ||
| lambda | ||
| src | ||
| static | ||
| .gitignore | ||
| _headers | ||
| gatsby-config.js | ||
| gatsby-node.js | ||
| LICENSE | ||
| netlify.toml | ||
| package.json | ||
| README.md | ||
| renovate.json | ||
| yarn.lock | ||
robbynshaw.com
Getting Started
$ yarn
$ netlify dev # or ntl dev
This uses the new Netlify Dev CLI feature to serve any functions you have in the lambda folder.
CMS
To test the CMS locally, you'll need run a production build of the site:
$ npm run build
$ netlify dev # or ntl dev
CMS is found at /admin/
Available scripts
build
Build the static files into the public folder, turns lambda functions into a deployable form.
Usage
$ yarn build
clean
Runs gatsby clean command.
Usage
yarn clean
netlify dev
Starts the netlify dev environment, including the gatsby dev environment. For more infor check the Netlify Dev Docs
netlify dev
develop or start
Runs the clean script and starts the gatsby develop server using the command gatsby develop. We recomend using this command when you don't need Netlify specific features
Usage
yarn develop
test
Not implmented yet
Usage
yarn test
format
Formats code and docs according to our style guidelines using prettier
Usage
yarn format
Tech Stack
- JAMstack architecture by using Git as a single source of truth
- Netlify for continuous deployment, and CDN distribution.
Prerequisites
- Node (I recommend using v8.2.0 or higher)
- Gatsby CLI
- Netlify CLI
Media Libraries (installed, but optional)
Media Libraries have been included in this starter as a default. If you are not planning to use Uploadcare or Cloudinary in your project, you can remove them from module import and registration in src/cms/cms.js. Here is an example of the lines to comment or remove them your project.
import CMS from 'netlify-cms-app'
// import uploadcare from 'netlify-cms-media-library-uploadcare'
// import cloudinary from 'netlify-cms-media-library-cloudinary'
import AboutPagePreview from './preview-templates/AboutPagePreview'
import BlogPostPreview from './preview-templates/BlogPostPreview'
import ProductPagePreview from './preview-templates/ProductPagePreview'
import IndexPagePreview from './preview-templates/IndexPagePreview'
// CMS.registerMediaLibrary(uploadcare);
// CMS.registerMediaLibrary(cloudinary);
CMS.registerPreviewTemplate('index', IndexPagePreview)
CMS.registerPreviewTemplate('about', AboutPagePreview)
CMS.registerPreviewTemplate('products', ProductPagePreview)
CMS.registerPreviewTemplate('blog', BlogPostPreview)
Note: Don't forget to also remove them from package.json and yarn.lock / package-lock.json using yarn or npm. During the build netlify-cms-app will bundle the media libraries as well, having them removed will save you build time.
Example:
yarn remove netlify-cms-media-library-uploadcare
OR
yarn remove netlify-cms-media-library-cloudinary