Chapter 4. Planning for the JAMstack
This section covers the JAMstack end-to-end setup and highlights the choices you’ll make along the way to create the appropriate setup for your team. These decisions include the following:
How you’ll manage the project/code
Where you’ll store your content
What software will build your site
How your build process will be automated
Where your site will be published
What services and APIs your live site will use
Let’s look at each one in turn.
Setting Up the Project
With no server or database to configure, a JAMstack project is largely a simple folder structure full of text files. The contents of your JAMstack project will usually include the following:
A source folder to store your content files
A folder for layouts and templates
A configuration file containing the settings for the build process
A static site generator, usually added as a dependency
A destination folder to save the final output
You can manage your entire project locally, directly on your computer, but it’s always best to begin by setting up a hosted Git repository. Even if you are the only site author, starting a repository will give you an online backup, store the history of the project, and eventually allow others to contribute. And in a moment, you’ll also see how a hosted repository is key to triggering new builds whenever a change is pushed.
Rarely would you set up your entire project folder from scratch because most site generators have sample projects that you can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access