Set Cloudflare HTTP Headers in Hugo

In a previous post I wrote about how to set Cloudflare HTTP headers using Cloudflare Workers. In this post, I’ll show you how to do the same thing using Hugo. Thanks to Grok, I learned a nifty trick for setting Cloudflare HTTP headers in Hugo. Instead of using Cloudflare Workers, you can use Hugo’s built-in support for setting HTTP headers. To do so, create the file static/_headers with your header content following Cloudflare’s format. As an example, here’s the content of this site’s static/_headers file: ...

February 19, 2025 · 1 min · 158 words · Chris

Using Local Fonts - Hugo Academic Theme

The fresh new look of this site is provided by the Academic Hugo Theme. Because I value your privacy just as I value my own, I needed to modify this theme to not make use of Google Web Fonts because use of this service enables Google to further track users. In this guide, I’ll add the Montserrat font by Julieta Ulanovsky as the heading font for this blog: TL;DR - Recap Step 1 - Select font character set and weights using Google web fonts helper Search for Montserrat using the Google Web Fonts Helper app and select the weights desired: ...

September 3, 2020 · 6 min · Chris