4 ms·
It turns out that building a site in plain HTML, without fancy tools, isn't nearly as difficult as using stuff like gatsby once you get down to it. Hell, just
by ljm 6y ago
It turns out that building a site in plain HTML, without fancy tools, isn't nearly as difficult as using stuff like gatsby once you get down to it.
Hell, just throw in some PHP if you want dynamic bits and pieces. Your fancy netlify/cloudflare/vercel setup may not like it but your infinitely cheaper shared host/VPS provider will.
If you still wanted static output, you could probably serve it locally and then let wget crawl it for you.
- madeofpalk 6y ago> If you still wanted static output, you could probably serve it locally and then let wget crawl it for you. Here's the complexity part that tools try to solve.
- john-shaffer 6y agoThere are decoupled tools like https://statically.io/ https://statically.io/ to do this. One can have the straightforward builds of GP and still have good static site generation.
- madeofpalk 6y agocool, we've just made something more complicated than netlify or whatever. Looks like a great tool for migrating an existing dynamic site into a more static workflow, but it's not exactly the workflow I was replying to.
- icebraining 6y ago> infinitely cheaper It's actually the opposite. Static site hosting is so much easier to optimize, that it costs just few cents a month, if anything at all (I never went beyond Netlify's free plan).
- madeofpalk 6y ago> I never went beyond Netlify's free plan There you go. Go beyond Netlify's free plan and it can get pretty expensive.
- icebraining 6y agoNot really, you can just easily switch to another solution, like B2+Cloudflare, which costs pennies.
- ljm 6y agoThat's the cost of hosting the end result. How much of your precious time did you spend building your site in a way to make 'static site hosting' (i.e. a file server behind a CDN) work? Did you put time into some CI workflow on Github to precompile the site and push it to Netlify? Did you mess around with Netlify itself to build what you want? I can do exactly the same with a cheap VPS running apache and PHP and a deploy is little more than an SCP or FTP upload away. I don't have to worry about a build pipeline at all. I'm not aiming this at you, but in general I'd love to see how newer engineers would tackle things like deployment if they couldn't rely on some SaaS offering. Or are we talking about static sites that are static because they do all the server side stuff on the browser, and you're pulling down things like react and graphql to render a blog post?
- icebraining 6y agoNah, no CI workflow, I generate locally. Creating the site was just pip install pelican; git init . ; pelican-quickstart; vim pelicanconf.py # to set the theme Then to publish: pelican . && git add -A && git commit -m "post title" && git push (I have a shortcut for this, of course) But I think you overestimate the time to "setup the CI workflow" actually takes. It's just a text file where you put the commands above, so it can run on the server instead of your machine. There's no black magic to it. > I don't have to worry about a build pipeline at all. Of course you do; it's just that your build pipeline runs every time someone accesses your site. > I'm not aiming this at you, but in general I'd love to see how newer engineers would tackle things like deployment if they couldn't rely on some SaaS offering. I've done that too. I created a bare git repo on the server, with a post-receive hook that checkouts "master" and runs the static site generator. Then I had Nginx serve the directory.