Today I Learned (May 25, 2024)

How to bootstrap a website with GatsbyJS

Simply install NodeJS (>= v18), install the Gatsby CLI, pick a parent directory (let’s pick /tmp) and run

gatsby new

The CLI will guide you through the setup and bootstrap the project for you. Assuming you picked the name thewebsite, you may do the following to launch your new website locally

cd /tmp/thewebsite
npm install
npm run develop

You should now be able to open the default page in your browser at http://localhost:8000/.

:information_sign: I picked Tailwind CSS as my styling system and the following options * responsive images, * automatic sitemap, * manifest file generation, and * Markdown support (without MDX)

:link: (gatsbyjs.com) Getting Started

GatsbyJS also supports templates. For example, if you want to start with a simple blog theme, you may specify the template URL in the gatsby new command

gatsby new theblog https://github.com/gatsbyjs/gatsby-starter-blog

A list of starters is available from the GatsbyJS website’s starter page. Third party templates may, for example, be found on jamstackthemes.dev (select Gatsby in the SSG selection menu to the left).