Make sure you have the silverstripe-gatsby module installed on your Silverstripe backend.
-
Create a Gatsby site.
Use the Gatsby CLI to create a new site, specifying the default starter.
# create a new Gatsby site using the Silverstripe CMS starter gatsby new my-silverstripe-starter https://github.com/silverstripe/gatsby-starter-silverstripe
-
Configure
yarn setup
- Start me up
Navigate into your new site’s directory and start it up.
cd my-silverstripe-starter/
yarn develop
-
Open the source code and start editing!
You should now see your Silverstripe CMS website in a default theme 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
my-silverstripe-starter
directory in your code editor of choice and editsrc/pages/index.js
. Save your changes and the browser will update in real time!
See the gatsby-source-silverstripe repository for further documentation on customising your Silverstripe + Gatsby project.