O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with Static Sites

Book Description

Just like vinyl LPs, static sites are making a comeback, evidenced by the wide array of static-site generators now available. This practical book shows you hands-on how to build these simple sites for blogs and other use cases, and how to make them more powerful. In the process, you’ll work with some of today’s more mature and popular static-site generators.

Table of Contents

  1. Preface
    1. What You Need to Know
    2. Conventions Used in This Book
    3. Using Code Examples
    4. O’Reilly Safari
    5. How to Contact Us
    6. Acknowledgments
  2. 1. Why Static Sites?
    1. Benefits of Static Sites
      1. Static Sites Are Fast
      2. Static Sites Are Secure
      3. Other Benefits
      4. What Kinds of Sites Can Go Static?
      5. What Are Static Site Generators?
  3. 2. Building a Basic Static Site
    1. Welcome to Harp
    2. Your First Harp Project
    3. Working with Layouts and Partials
    4. Working with Data
    5. Generating a Site
    6. Building Camden Grounds
    7. Going Further with Harp
  4. 3. Building a Blog
    1. Blogging with Jekyll
    2. Your First Jekyll Project
    3. Writing a Post
    4. A Quick Introduction to Liquid
    5. Working with Layouts and Includes
    6. Adding Additional Files
    7. Working with Data
    8. Configuring Your Jekyll Site
    9. Generating a Site
    10. Building a Blog
    11. Going Further with Jekyll
  5. 4. Building a Documentation Site
    1. Characteristics of a Documentation Site
    2. Choosing a Generator for Your Documentation Site
    3. Our Sample Documentation Site
    4. Creating the Site
      1. Installing Hugo
      2. Generating the Initial Site Files
      3. Configuring the Hugo Site
      4. Adding Content
      5. Creating the Layout
    5. Going Further
  6. 5. Adding Dynamic Elements
    1. Handling Forms
      1. Wufoo Forms
      2. Google Docs Forms
      3. Formspree
      4. Adding a Comment Form to Camden Grounds
    2. Adding Comments
      1. Working with Disqus
      2. Adding Comments to The Cat Blog
    3. Adding Search
      1. Creating a Custom Search Engine
      2. Adding a Custom Search Engine to a Real Site
    4. Even More Options
  7. 6. Adding a CMS
    1. CloudCannon
      1. Creating a Site on CloudCannon
      2. Editing a Site on CloudCannon
      3. Where to Go from Here
    2. Netlify CMS
      1. Setting Up the Netlify CMS
      2. Where to Go from Here
    3. Jekyll Admin
      1. Setting Up Jekyll Admin
      2. Editing a Site in Jekyll Admin
      3. Where to Go from Here
    4. More Options
      1. Forestry.io
      2. Lektor
      3. Headless CMS
  8. 7. Deployment
    1. Plain Old Web Servers
    2. Cloud File Storage Providers
      1. Hosting a Site on Amazon S3
      2. Hosting a Site on Google Cloud Storage
    3. Deploying with Surge
    4. Deploying with Netlify
    5. Summary
  9. 8. Migrating to a Static Site
    1. Migrating from WordPress to Jekyll
    2. Other Migration Options
      1. Hugo
      2. Middleman
      3. Hexo
      4. Harp
      5. Many More Options Are Available
    3. Go Forth and Be Static
  10. Index