Wednesday, March 15, 2023

Install Gatsby JS in ubuntu

Hello

Today I saw you How to install GatsbyJS in ubuntu. Follow these steps.


1. First go to your wordpress website folder, open terminal and run these commands.

2. sudo npm install -g gatsby

sudo npm install -g gatsby-cli

Check version : gatsby --version


3. To create a new site using the official WP Gatsby starter, run "gatsby new gatsby-site". That will fetch this starter and put it in a new directory called "gatsby-site" .

If you found any error here please delete this folder "gatsby-site" in wordpress directory. And again run above step.


4. now go to and "gatsby-site" by "cd gatsby-site" run this : "gatsby develop"


it will take 1 minute. Now you can find 2 url in terminal like these: 

http://localhost:8000/

http://localhost:8000/___graphql


5. This is your gatsby site: http://localhost:8000/  If you want to edit this, go to "src->pages" folder. You can find index.js. You can edit it. You can also edit "srs->templates" and "src->components". 



No comments:

Post a Comment