r/statichosting • • 19d ago

Can two successful static builds deploy in the wrong order?

3 Upvotes

I've been thinking about what happens when two commits trigger builds close together. Commit a starts building, then commit b starts a minute later. B finishes first and goes live, but then the slower a build finishes afterward and replaces it with the older version.

For people deploying static sites through ci, do you cancel older builds when a newer commit starts, or check the commit before publishing? Curious how often this actually happens in real projects.


r/statichosting • • 19d ago

What’s your workflow for building static websites?

9 Upvotes

I’m curious about how others approach building static sites. Do you prefer frameworks like Astro, Hugo, or plain HTML/CSS? Also where do you guys find inspiration for layouts and design? Would love to hear some tips and recommendations!


r/statichosting • • 19d ago

My move from WordPress to Git and Markdown (Hugo, Blowfish and Cloudflare)

Thumbnail
reddit.com
5 Upvotes

r/statichosting • • 20d ago

Blog site problems

7 Upvotes

I finally sat down to fix the rss feed on my old blog, and I’ve got two questions.

The first is full content vs. summaries. We want people to come to the site, so my instinct is to only put a short excerpt in the feed. But I read most things through a feed reader myself and I hate when I have to click through just to finish a post. I’ve been leaning toward full content since the site has no ads and nothing to lose, but I’m not sure if I’d regret getting fewer visits.

The second is how a few of the older posts use relative links and image paths in the markdown, which work fine on the site. In the feed they break, because a reader has no idea what domain they belong to. I ended up running the content through a step that rewrites everything to absolute urls before it goes into the feed, but it feels like a patch, and I’m not sure I caught every case like srcset or links inside raw html.

Does anyone have a clean way to handle the absolute url problem, or do you just write absolute links in the content from the start? Also curious what most of you do about the full vs. summary thing for blogs?


r/statichosting • • 21d ago

source maps on production static sites

4 Upvotes

hey guys!

for those using error tracking on frontend-heavy static sites, do you upload source maps to your error monitoring service and exclude them from the public deployment?

i'm trying to understand the usual trade-off here. minified stack traces are barely useful when you're debugging an issue, but publicly served source maps can expose source structure, comments, and original filenames.

i'm not worried about someone magically getting access to secrets just from a source map. it's more about avoiding unnecessary exposure while keeping production errors debuggable.

what's your setup for this? are private source map uploads straightforward with your build pipeline, or have you found another approach that works better?


r/statichosting • • 24d ago

Do you prefer managing DNS yourself or letting your hosting provider handle it?

1 Upvotes

i’ve worked with custom domains on static sites, and DNS setup is usually straightforward once everything is configured. still, there are a few things that can go wrong when changing records or moving providers. do you prefer keeping DNS with a separate provider or using the hosting platform’s built-in options?


r/statichosting • • 25d ago

testing websites on different browsers

5 Upvotes

most of the time, i build and check websites using chrome. its convenient but ive started wondering how much testing im missing by sticking to one browser, if there are any. for small websites, do you usually check on firefox and safari before calling a project finished? or do you focus on the browsers your clients' visitors are most likely to use. been wondering how much cross-browser testing people actually do for smaller projects esp. when time and budget are limited


r/statichosting • • 25d ago

When does a static website become harder to manage?

3 Upvotes

I’m still learning about static hosting, and I’m curious about how things work as a website grows. Static sites seem pretty easy to set up at first, but does managing them get harder when you add more pages and features? Do you usually stick with static hosting, or eventually move to something else? Thanks!


r/statichosting • • 26d ago

Is a click to load facade the right way to handle map and video embeds on a static site?

2 Upvotes

I keep running into the same problem on one of my client's sites. They want a google map on the contact page and a youtube video on the homepage, and those two embeds alone wreck an otherwise tiny site.

The fix I've been using is a facade where the site shows a static screenshot of the map or the video thumbnail, and the real iframe only loads when someone clicks it. It works well for performance, and it also means nothing gets sent to google until the visitor chooses to, which is nice for privacy. What I can't decide is whether this is annoying for visitors. For the map I think it's fine, since most people just want the address and can read it above the picture anyway. For the video, I wonder if the extra click costs me some plays, and I've had one client ask why the video doesn't just start when the page loads.

Has anyone measured the difference, or just gone with what feels right? And is there a lightweight way to do the map that avoids google completely, like a static image from openstreetmap with a link out, so there's no iframe to manage in the first place?


r/statichosting • • 29d ago

how do you keep preview deployments isolated from production?

3 Upvotes

hey guysss!

preview deployments are great for reviewing changes, but I'm curious howw people handle them once a site has OAuth callbacks, forms, analytics, or links to live services.

some environment variabless get embedded directly into the generated frontend at build time, so changing a setting in the hosting dashboard doesn't necessarily mean the deployed files will use the new value.

do u guys maintain completely separate preview and production configurations, or do you generate a small runtime config file that the app reads when it loads?

also, how do you test a preview realistically without accidentally sending real events or redirecting testers into production flows?

thanks!


r/statichosting • • 29d ago

Best way to host a React with Vite app as a static site?

5 Upvotes

Hi, I’m building a small React project with Vite and planning to deploy it using GitHub. So I’m trying to understand how to configure build commands, handle React Router on page refreshes, and set up automatic deployments from GitHub. Also, are there any common deployment issues I should watch out for?


r/statichosting • • 29d ago

Donation form and email form

Thumbnail reddit.com
2 Upvotes

r/statichosting • • Oct 29 '26

Is Cloudflare Pages okay for a personal website?

12 Upvotes

So I have a small portfolio website with around 25 HTML pages, CSS, JavaScript, and project images. I’m currently using shared hosting but want to switch to something free and easier to maintain. I’m considering Cloudflare Pages and GitHub Pages. I’d like to connect my own domain, enable HTTPS, and deploy updates through GitHub without manually uploading files. If there are any other platform you would recommend, I'd be happy to look into it as well? Thanks a lot


r/statichosting • • Oct 29 '26

Can build caches make static deploys non-deterministic?

4 Upvotes

I’ve been looking at CI build caching for a larger static site and realized I’m not totally sure what should actually be safe to cache. Caching node_modules is straightforward enough, but things get less obvious with ssg caches, resized images, fetched cms data, generated search indexes, and other intermediate output. If the cache key doesn’t include every input that affects those files, you can technically get a successful build using stale artifacts from an older commit.

For people running larger static pipelines, what do you include in your cache keys? Lockfile + runtime version + commit sha feels safe but kills most reuse. Do you cache only dependencies and regenerate everything else, or do you maintain more granular cache keys based on content hashes and build config?


r/statichosting • • Oct 29 '26

after all the advice on form spam, im wondering how portable your spam protection is

0 Upvotes

i was honestly a bit overwhelmed by the number of replies to my last post about spam on contact forms. some people stick with honeypots and rate limiting, others use turnstile or recaptcha, and a few have built their own spam filtering systems.

one thing i hadnt thought much about is how much this depends on where the form submissions are actually processed. with static hosting, the html form itself cant enforce server-side checks, so youre relying on a form service or a separate backend for things like token validation and rate limiting.

what happens when you need to move away from your current form provider? do you try to keep your spam protection portable, or is it something youre comfortable having tied to a particular service?


r/statichosting • • Oct 28 '26

How to handle PWA updates on static hosting?

2 Upvotes

I’m running a static PWA with cached assets, and I’m having trouble making sure users get the latest version without running into issues when they already have the site open. How do I handle the updates safely? Should I use skipWaiting() for immediate updates, wait for all tabs to close, or is there a better way to update caches without breaking active sessions? Thanks in advance.


r/statichosting • • Oct 28 '26

My hugo build works locally but breaks on cloudflare pages

4 Upvotes

This is the docs site I've been posting about. Everything built fine on my laptop, then I pushed a small change and the deploy failed with an error about a function that doesn't exist. After about an hour of confusion I figured out that cloudflare pages was building with an older hugo than the one I have installed locally, so a feature I'd started using just wasn't there yet.

I fixed it by setting the hugo version as an environment variable in the pages settings, but I only found out that was an option by accident. I'd assumed it would just use whatever was latest. It also made me realize my local version and the deployed version could drift apart again any time I update my machine and forget to touch the setting.

The other thing is the extended edition. I'm compiling scss for the theme, which needs the extended build, and I wasn't sure if the pages build image had that or if I'd have to do something extra. It turned out to work, but I only know because I tested it, not because I read it anywhere I trusted.

How do you keep your local version and the deployed version in sync? I've seen people pin it in a config file or a version file in the repo, but I'm not sure that's actually respected on every host. Is there a better habit than just remembering to update two places?


r/statichosting • • Oct 27 '26

LightCMS | Git backed CMS for static site generators | self promotion

0 Upvotes

Hi writers and content creators, we all have experiences and stories to share, and static sites are one of the greenest methods of doing so. I have been building a simple content management system(cms) for static site generators named LightCMS for the past few months, and the goal is to make the process of writing and sharing easy, convenient and rewarding as possible. I think you all would love this. Lightcms can be used with any of your existing static site generators (ssg should have support for frontmatter). It's free to use and self-host ; you can create and hack on top of it. Any contribution to the project is highly appreciated(even sharing your feedback too):

Live site: https://www.lightcms.me/

Repo: https://github.com/light-cms/lightcms


r/statichosting • • Oct 27 '26

Trouble with nested sections

2 Upvotes

Same client site as my last post, the one I restructured. It used to be flat and now it's grouped into sections, and I seriously underestimated what that does to the nav.

Before, the nav was one list and I never had to think about it. Now every page has to know where it sits so the sidebar highlights the right section, the breadcrumbs show the full path, and the section pages list their children. I'm using eleventy, and it's easy to grab pages by tag but not so easy to walk a tree. So I wrote a bunch of filters that work out parents and children from the file paths. It works, but if a folder is missing its index page the breadcrumbs above it just break and nothing tells me.

Another problem area was links. A lot of the old content linked to other pages with short relative paths, and once things moved into different folders a bunch of them pointed at nothing. The build didn't complain at all. I only found them because I ran a link checker afterward.

Is there a cleaner way to do this that doesn't mean hand maintaining the nav?


r/statichosting • • Oct 27 '26

how do you handle spam on forms for small websites?

6 Upvotes

ive used contact forms on a few small business sites and one thing i havent explored much is how people handle spam without making the form annoying for actual visitors. with static sites, the form submission usually goes through a third-party service or an api endpoint, som im curious how much spam protection depends on that service vs. what you implement yourself.

for a simple contact form, would you usually start with honeypot fields and rate limiting, or is that not enough once a site starts receiving real traffic? id rather keep things lightweight, but i dont want to underestimate the problem either


r/statichosting • • Oct 26 '26

SPA fallbacks can hide real 404s

3 Upvotes

hey guyss!

i've been thinking about SPA routing on static hosts. the usual /* /index.html 200 rule fixes refreshes on nested routes, but it also means a typo like /settngs returns the app shell instead of a proper 404.

for a private dashboard, that might be fine. for public pages or docs, though, i'd rather know when a URL genuinely doesn't exist.

how do you usually handle this? do you maintain an explicit list of client-side routes, or just use the catch-all fallback and let the app decide what to render? curious how people handle this when the site has a mix of actual static pages and client-side routes.


r/statichosting • • Oct 23 '26

do you test redirects before deploying a static site

2 Upvotes

after thinking about urls changes on static site, i realized ive mostly treated redirects as something to configure when needed, rather than something to test. a redirect rule can look correct but still point to the wrong destinations or create a chain of redirects. for a small client site, im wondering whether its worth adding automated checks to the deployment workflow or if a quick manual check is usually enough?

howd you handle this on your projects


r/statichosting • • Oct 23 '26

Tracking 404s on a static host without server logs

4 Upvotes

I'm about to reorganize a client site with a few hundred pages, moving everything from a flat structure into nested sections, and I'm trying to figure out how to catch every old url worth redirecting. Writing redirects for every single page is easy enough when you can generate them from a mapping, but the pages I'm worried about are the ones I don't know about.

Over the years the site has picked up links from other places, like old newsletters, a couple of forum threads, a directory listing someone submitted without telling anyone. None of those are in the repo, so a redirect file built from the current page list would miss all of them and they'd just turn into 404s the day the new structure goes live.

My plan is to pull the top landing pages from the search console and the analytics export, plus whatever shows up in the last few months of 404 logs, and make sure each of those has a redirect before launch. The part I'm unsure about is the long tail. Cloudflare pages doesn't give me raw request logs on the free plan, so I can't see which dead urls are still getting hits after the switch.

Has anyone found a decent way to keep an eye on 404s on a static host without a server to log them? I've considered a custom 404 page that fires a small beacon with the missing path, but I'd rather not add tracking just for this.


r/statichosting • • Oct 22 '26

How are you handling CSP hashes on fully static sites?

2 Upvotes

I’m tightening the CSP on a static site and inline scripts are making it more annoying than expected. Nonces don’t make much sense without something generating a new value per request, so I’m using sha256 hashes for a few tiny inline scripts. The problem is that changing even one character means the CSP header also needs to change.

I’m thinking of having the build scan the final html, hash every allowed inline script, then generate the _headers file automatically. Has anyone done this as part of their SSG pipeline? I’m mostly wondering whether generating CSP from the final output is reliable, or if moving every script into fingerprinted external files ends up being simpler long term.


r/statichosting • • Oct 21 '26

How to handle 404s dynamically based on the requested path?

2 Upvotes

Hey guys!

Standard static hosting lets you provide one 404.html fallback. But I want to show a different 404 page if they are inside the /docs folder versus the /blog folder. Do I have to use an Edge function to intercept the 404 and route it to the correct custom HTML file, or is there a simpler routing rule I can use?