News for hackers. Stuff that matters.
Re:Ask HN: Cheapest/easiest way to host a static site? by thitcanh on Friday March 26, 2021 @10:19PM (#26599281)
Basically everything you wrote about GitHub Pages is wrong.

GitHub Pages is static hosting. If you don’t need Jekyll, don’t use it. There’s nothing special about it.

GitHub Pages does NOT charge for custom domains.

You can configure any branch for GitHub Pages, or even just the /docs folder on the main branch.

Re:Ask HN: Cheapest/easiest way to host a static site? by qbasic_forever on Friday March 26, 2021 @10:58PM (#26599510)
Just as a clarification, much of what you mention has only changed in the last year or so. For a very long time gh-pages branch and Jekyll were assumed (you couldn't even use plugins with Jekyll). Custom domains weren't free. SSL wasn't free. Github is doing great stuff but it has taken time to evolve into the all free all you can eat buffet you see today.
Re:Ask HN: Cheapest/easiest way to host a static site? by hellojason on Friday March 26, 2021 @11:21PM (#26599628)
I have to agree with parent. I've had a custom domain without Jekyll on GitHub pages for well over 5 years now, and it's been free the entire time.
Re:Ask HN: Cheapest/easiest way to host a static site? by heyoni on Saturday March 27, 2021 @01:52AM (#26600248)
Same here. Not sure where they’re getting that from. Possibly region specific?
Re:Ask HN: Cheapest/easiest way to host a static site? by singhrac on Saturday March 27, 2021 @03:30AM (#26600647)
I replied upthread, but I made a mistake reading https://docs.github.com/en/github/working-with-github-pages/... when revisiting what I remembered, and I was just looking at it from the perspective of private repos. My bad!
Re:Ask HN: Cheapest/easiest way to host a static site? by hellojason on Sunday March 28, 2021 @11:11AM (#26610995)
Oh right, good point. The repo had to be public until very recently.
Re:Ask HN: Cheapest/easiest way to host a static site? by villgax on Saturday March 27, 2021 @01:09AM (#26600082)
Get your facts straight, they have had custom domains for a looong time & there was absolutely no need for Jekyll either at any point to host a page, it just happened to be one the most documented/blogged about way to use GitHub pages with automatic builds instead of having static content.
Re:Ask HN: Cheapest/easiest way to host a static site? by brandly on Saturday March 27, 2021 @01:36AM (#26600180)
Free SSL for custom domains happened a few years ago: https://github.blog/2018-05-01-github-pages-custom-domains-h...
Re:Ask HN: Cheapest/easiest way to host a static site? by villgax on Saturday March 27, 2021 @02:41AM (#26600454)
That's almost 3 years ago, thread OP said an year or so
Re:Ask HN: Cheapest/easiest way to host a static site? by stevage on Saturday March 27, 2021 @03:48AM (#26600715)
Much more than a year, maybe 2-3 years.
Re:Ask HN: Cheapest/easiest way to host a static site? by singhrac on Saturday March 27, 2021 @03:18AM (#26600596)
I think we've both said correct things, but I think you've missed my meaning: yes, I understand that Github Pages is static hosting, I was point out that by default the build system uses Jekyll. This is nonobvious.

This is in the docs: "GitHub Pages will use Jekyll to build your site by default. If you want to use a static site generator other than Jekyll, disable the Jekyll build process by creating an empty file called .nojekyll in the root of your publishing source, then follow your static site generator's instructions to build your site locally." (https://docs.github.com/en/github/working-with-github-pages/...). Netlify and CF will both run some other static site generators (e.g. Hugo in my case) for you, while Github Pages will run Jekyll (or you can build locally).

And yes, custom domains are free for public repos. I made a mistake reading the page about custom domains, which mentioned that private repos need a Github Pro account. You're also right about configuring any branch.

Re:Ask HN: Cheapest/easiest way to host a static site? by stevage on Saturday March 27, 2021 @03:47AM (#26600714)
I don't use Jekyll and I have never set up a .nojekyll file. I don't know what that is meant to do, but you can deploy whatever you want and it will work just fine.

Maybe you need that file on the rare offchance that you're deploying a site that contains something that looks like a Jekyll config, but you don't want it to be built that way.

Re:Ask HN: Cheapest/easiest way to host a static site? by tomerv on Saturday March 27, 2021 @05:33AM (#26601112)
Yes, that's exactly the issue. I don't remember the exact file name, maybe it was a directory named "static". The behavior was not as expected, and only a Google search helped me figure out why files were disappearing.