small medium large xlarge

Build Websites with Hugo: Fast Web Development with Markdown


Cover image for Build Websites with Hugo

Build Websites with Hugo

Fast Web Development with Markdown


Rediscover how fun web development can be with Hugo, the static site generator and web framework that lets you build content sites quickly, using the skills you already have. Design layouts with HTML and share common components across pages. Create Markdown templates that let you create new content quickly. Consume and generate JSON, enhance layouts with logic, and generate a site that works on any platform with no runtime dependencies or database. Hugo gives you everything you need to build your next content site and have fun doing it.

Choose Your Format(s)

  • $18.95 In Stock
    • Beta: What do I get?

  • Ebooks are DRM free.

  • Ebook delivery options.

About this Title

Pages: 140 (est)
Published: 2020-05-10
Release: B2.0 (2020-03-27)
ISBN: 978-1-68050-726-3

Database-driven sites bring complexity you might not need, but building a site by hand is too much work. Hugo is a static site generator and web development framework that creates content sites quickly without the overhead or dependencies of a dyanmic web framework. With Hugo, you use HTML templates and Markdown to build static sites you can host anywhere, letting you use the skills you already have.

Develop your own theme using standard HTML and CSS, using Hugo’s powerful templating features to organize your site’s components. Create your site’s content with HTML or Markdown and use Hugo’s content templating features to build new content quickly. Build a fully-featured blog with archive pages, tagging, and pagination, and integrate an external commenting system to provide interactivity. Use data from front-matter, site-wide configuration, and external JSON sources to add content, and generate JSON others can use. Integrate JavaScript with your site to create a search engine. Get Hugo working with Webpack so you can leverage the wider web development ecosystem, and explore ways to publish your site to various services. Finally, learn how you can move your existing content site to Hugo.

Dive in and build your next site with Hugo!

Contents & Extracts

This book is currently in beta, so the contents and extracts will change as the book is developed.

  • Acknowledgments
  • Preface
    • What’s In This Book
    • What You Need
    • Conventions
    • Online Resources
  • Kicking the Tires
    • Installing Hugo
    • Creating Your Site
    • Building the Home Page
    • Creating Content Using Archetypes
    • Building and Exploring Hugo’s Output
    • Your Turn
    • Wrapping Up
  • Building a Basic Theme excerpt
    • Generating the Theme
    • Using Content Blocks and Partials
    • Styling the Theme with CSS
    • Your Turn
    • Wrapping Up
  • Adding Content Sections
    • Creating a Project Archetype
    • Creating the List Layout
    • Creating More Specific Layouts
    • Adding Content to List Pages
    • Customizing the Project List
    • Your Turn
    • Wrapping Up
  • Working with Data excerpt
    • Using Site Configuration Data in your Theme
    • Populating Page Content using Data in Front Matter
    • Conditionally Displaying Data
    • Using Local Data Files
    • Pulling Data from Remote Sources
    • Syndicating Content with RSS
    • Rendering Content as JSON
    • Your Turn
    • Wrapping Up
  • Adding a Blog excerpt
    • Creating the Post’s Layout
    • Organizing Content with Taxonomies
    • Customizing the URL for Pages
    • Customizing Blog List Pages
    • Adding Pagination
    • Adding Comments to Posts using Disqus
    • Displaying Related Content
    • Your Turn
    • Wrapping Up
  • Adding Search to your Site
    • Creating the Document Collection.
    • Creating the Search Interface
    • Improving the Search
    • Your Turn
    • Wrapping Up
  • Managing Assets with Pipes
    • Managing Stylesheets
    • Managing Images
    • Bundling JavaScript files
    • Using Webpack and npm with Hugo
    • Your Turn
    • Wrapping Up
  • Deploying the Site
    • Deploying to Netlify
    • Deploying to Cloud Storage with Hugo
    • Deploying to a Traditional Web Server
    • Your Turn
    • Wrapping Up
  • Migrating to Hugo
    • Understanding What You Have
    • Transferring the Content
    • Replicating the Theme
    • Making the Switch
    • Wrapping Up


Brian Hogan is a web developer, editor, and author of technical books, including Small, Sharp Software Tools, Exercises For Programmers and tmux 2: Productive Mouse-Driven Development. When he’s not working, he’s hacking on code, composing music, or spending time with family and friends.