Before start development or deploy make sure our spark-lite
WordPress plugin is installed inside your WordPress installation Download Spark Lite.
- At least one blog post with featured Image in your WordPress site
- One category and that category related post
To install gatsby CLI globaly.
npm install -g gatsby-cli
-
Create a Gatsby site.
Use the Gatsby CLI to create a new site.
# create a new Gatsby site using theme callisto gatsby new callisto https://github.com/wpspark/gatsby-theme-callisto.git
-
Create
.env
file.Navigate into your new site’s directory and create a new
.env
file.cd callisto/ touch env/.env.mysitename
Open
.env.mysitename
file with a text editor and add below config inside.env.mysitename
file.baseUrl = "yoursite.com" # without http/https protocol = "https"
-
Start developing.
To start development process run below command from your terminal.
gatsby develop mysitename or npm start mysitename
-
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. -
Build Process.
To build your site run bellow command from your terminal.
npm run clean gatsby build mysitename