Table of Contents
Preface vii
1 Why Static Sites? 1
Benefits of Static Sites 2
Static Sites Are Fast 2
Static Sites Are Secure 2
Other Benefits 3
What Kinds of Sites Can Go Static? 3
What Are Static Site Generators? 4
2 Building a Bask Static Site 9
Welcome to Harp 10
Your First Harp Project 12
Working with Layouts and Partials 16
Working with Data 19
Generating a Site 25
Building Camden Grounds 25
Going Further with Harp 37
3 Building a Blog 39
Slogging with Jekyll 39
Your First Jekyll Project 41
Writing a Post 45
A Quick Introduction to Liquid 48
Working with Layouts and Includes 50
Adding Additional Files 52
Working with Data 54
Configuring Your Jekyll Site 57
Generating a Site 59
Building a Blog 59
Going Further with Jekyll 66
4 Building a Documentation Site 69
Characteristics of a Documentation Site 69
Choosing a Generator for Your Documentation Site 70
Our Sample Documentation Site 71
Creating the Site 74
Installing Hugo 74
Generating the Initial Site Files 75
Configuring the Hugo Site 76
Adding Content 77
Creating the Layout 79
Going Further 86
5 Adding Dynamic Elements 87
Handling Forms 87
Wufoo Forms 88
Google Docs Forms 93
Formspree 97
Adding a Comment Form to Camden Grounds 99
Adding Comments 101
Working with Disqus 102
Adding Comments to The Cat Blog 105
Adding Search 106
Creating a Custom Search Engine 106
Adding a Custom Search Engine to a Real Site 110
Even More Options 111
6 Adding a CMS 113
CloudCannon 114
Creating a Site on CloudCannon 114
Editing a Site on CloudCannon 117
Where to Go from Here 121
Netlify CMS 122
Setting Up the Netlify CMS 122
Where to Go from Here 130
Jekyll Admin 130
Setting Up Jekyll Admin 131
Editing a Site in Jekyll Admin 131
Where to Go from Here 135
More Options 135
Forestry.io 136
Lektor 137
Headless CMS 137
7 Deployment 141
Plain Old Web Servers 141
Cloud File Storage Providers 142
Hosting a Site on Amazon S3 142
Hosting a Site on Google Cloud Storage 147
Deploying with Surge 151
Deploying with Netlify 157
Summary 167
8 Migrating to a Static Site 169
Migrating from WordPress to Jekyll 169
Other Migration Options 174
Hugo 174
Middleman 176
Hexo 177
Harp 177
Many More Options Are Available 177
Go Forth and Be Static 177
Index 179