Deploying Hugo on Cloudflare Pages and Workers
Overview This post summarizes the full workflow we followed to move the Vel Tech Blog onto Cloudflare Pages with optional Cloudflare Workers integrations. 1. Configure Hugo locally 1 2 3 4 5 6 # Install Hugo extended 0.146 or later wget https://github.com/gohugoio/hugo/releases/download/v0.146.0/hugo_extended_0.146.0_Linux-64bit.tar.gz sudo tar -C /usr/local/bin -xzf hugo_extended_0.146.0_Linux-64bit.tar.gz hugo # Verify hugo version 2. Update the Hugo project Enable buildFuture = true so future-dated posts show up. Customize the PaperMod profile block (LinkedIn avatar, subtitle, post list). Add layouts/index.html to render the profile followed by all posts on the homepage. 3. Deploy with Cloudflare Pages Push the changes to GitHub. In Cloudflare Pages, set HUGO_VERSION=0.146.0. Pages automatically builds and deploys every commit. 4. Optional: Cloudflare Workers Use Workers to add caching, redirects, or dynamic APIs if needed. ...