All chapters

Chapter 13: Static Sites and Hugo

In Chapter 13: Static Sites and Hugo, you’ll explore how to blend powerful static site generators, such as Hugo, into your existing Python web stack. First, discover Hugo’s flexibility for building non-blog sites (e.g., data-driven pages) from Markdown and CSV files, all without a database or backend server. Then, learn two ways to embed those static files within your Docker/NGINX environment: host them standalone or nest them under routes in existing Flask apps, like /blog or /docs. You’ll also see tips for cross-linking sitemaps so search engines understand your entire site’s structure, even across static and dynamic app sections.

Buy the full book to get this chapter
Next up: Chapter 14: Picking a Python Web Framework
Talk Python's Mastodon Michael Kennedy's Mastodon