Gatsby : Open-Source static website generator

                                   GATSBY 

                 The Fastest  frontend for the Modern-web



"Web development today is completely different from what it was a few years ago", this statement is more-over a fact. Web-development is ever-evolving as well as changing field, the way websites are build today is totally different from the way it was a couple of years ago.

In this post, I am going to introduce you with a new way of front-end development, or  you can say, the modern-way of front-end development. Now, the most relevant question is ; 

Q.      Why to use a Static Site ? 

          Well, The Static site model doesn't fit all kinds of projects, but when it does it has a number of advantages. Here, I have mentioned few of them;

  • Speed
  • Simplified Hosting
  • Better Security
  • Better Developer Experience

Today while exploring to several other posts on linkedIn , I came across this amazing and powerful framework and jamstack delivery platform "GATSBY" it is used for building amazingly fast, secure, and beautiful websites. In this post we are going to focus about what it is and how it is useful for us.


  What is Gatsby ?

Gatsby is an Open-Source static website generator (SSG) that is based on the frontend development framework React and make use of Webpack and GraphQL technology.It was created in May 2015 by Kyle Mathews, it's the most simple way to build a website with React. It  can be used to build static sites that are progressive web apps, follow the lastest web standards, and optimized for the speed and security.


How it basically Works ?

Gatsby does the data-sourcing and fetches the files during the build time itself. All  this built data is then used  to generate the HTML, CSS and Javascript file necessary to run a super fast website. This static rendering is the backbone of Gatsby.


Getting  Started with Gatsby : build your first static site

Installing Gatsby and Creating your Project


                      For this, I would suggest you to locally installed Node.js first, Node comes bundled with npm, the Node package manager which we are going to use to install some of the libraries we'll be using.

The first thing you need to d is install Gatsby CLI . This is an npm package that lets you create a Gatsby site in a few  seconds. In your terminal,  write :

                                                     npm install -g gatsby-cli

With the Gatsby CLI installed on your machine, you  can go ahead and create your website. 
Once Gatsby CLI has installed all the necessary files and configured them appropriately, you'll have a fully functioning Gatsby website ready for your customize and build upon. To access it, move into the 
 sitepoint-demo folder  :

                                         
                                                     cd sitepoint-demo

and start the local server :

                                                      gatsby develop

 
Finally, open a window on    http://localhost:8000 where you'll find your amazing  Gatsby site.

You can visit the " Starter Library " and choose a template that you want to use in your website.

I hope this post was useful for you. For futher more information visit the following link :





                                                                                                                            - Dhriti Roy









Comments

Post a Comment

Popular Posts