TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How to host and manage static sites (of unlimited size) for free on Github

90 pointsby maxogdenover 12 years ago

12 comments

kecebongsoftover 12 years ago
I had a problem with Github user pages for the past few months: It stopped building.<p>At first I was more than happy that for every commits, I can see the changes immediately, but after few days, it just keep showing the old build. I even started a fresh new accounts and setup a new user page, same thing happened. I tried many things to make it work, adding/removing CNAME, changing the page content, even waiting for few days, no luck. Tried to contact the Github team (via Twitter and the Contact Us page), no respond.<p>Now I am using my shared VPS to host a static site, waiting for some good news about build reliability, until then I wouldn't recommend using Github user pages.<p>Oh and by the way, if you set a CNAME, you wouldn't be able to access your project pages without adding it as a submodule into your user page.
评论 #4880030 未加载
评论 #4880121 未加载
nthitzover 12 years ago
I wonder if people start abusing this if Github were to put any restrictions on it somehow. For quick one off single page things sure why not, but if people start trying to host huge websites on Github? I'd be curious as to their response.
评论 #4880355 未加载
评论 #4880575 未加载
hunvreusover 12 years ago
Great for hosting documentation, blogs, brochure sites or simple static clients: push your API code on master and other branches and have your static client to consume from the API on the gh-pages branch.<p>Be careful though, <i></i>if you push something on gh-pages it will be public, even if your repo is private<i></i>.<p>From what the guys at Github told me, they don't have to restrict their users as long as you don't commit obvious abuses. Either very large files or gigantic amount of files, which will both create issues with Git. In short, "don't be a dick".
simon_weberover 12 years ago
Github pages is a fantastic service. I use it as an automatic archive for a daily mailing list: <a href="https://github.com/simon-weber/the-listserve-archive" rel="nofollow">https://github.com/simon-weber/the-listserve-archive</a>.<p>Basically, Github is my free host, database and api.
reidracover 12 years ago
OT, but I'd love to know what HN think about this:<p>The license part of the README.md says "The content in this repo is BSD licensed".<p>AFAIK licensing requires:<p>- A copyright line with the year (or years) and the name of the copyright holder.<p>- IIRC a way to contact the copyright holder is required (email, URL, etc), but I may be wrong and it's just optional.<p>- A copy of the license grant/notice is required, ie. the "boilerplate notice" form Apache license that includes a link to the full license text.<p>In this case, does the "The content in this repo is BSD licensed" sentence have any kind of effect?<p>EDIT: ate a word, formatting
评论 #4881587 未加载
nnqover 12 years ago
...if you give something for free and don't set limits, people will find ways to abuse it ...and then you'll have limits for everyone ...<i>I ask all web developers out there to not use Github pages for clients' websites</i>, it's not like you don't have room in the budget for almost-free webhosting for static websites, it's probably something like 0.(...)1% of website maintenance and dev costs and there already are free blog hosting services. use github for <i>your</i> website/blog, <i>you family's</i>, <i>your pet's</i>, but <i>not for your clients'</i>, please...
评论 #4881003 未加载
nvr219over 12 years ago
I miss Geocities
评论 #4880136 未加载
评论 #4880969 未加载
aGHzover 12 years ago
Seems like a good place to link to "Poll: What's your favorite static site generator?"[1] submitted a few days ago. The most interesting notion to take away is that, for all the buzz surrounding static site generators like Jekyll and Pelican, you can actually accomplish the same goal using absolutely any backend you're comfortable with. As long as your output doesn't contain anything dynamic, you can even use frameworks like Django or Rails then pair this with a spider (e.g. wget) to pull all the dynamically-_generated_ output into a static snapshot that you then upload to GitHub.<p>[1] <a href="http://news.ycombinator.com/item?id=4857473" rel="nofollow">http://news.ycombinator.com/item?id=4857473</a>
jimmyttttover 12 years ago
<i>What it isn't: a dynamic host -- so it can't do PHP/Rails/Node etc.</i><p>Seems like a good opportunity for sever-less folks like WebScript.io or Firebase to jump in and help.
评论 #4880668 未加载
redidasover 12 years ago
Is the ability to use custom domains free now? In the past I thought you had to be under one of the paid github plans.<p>Oddly enough, I don't see any mention of this in the github article explaining how to set up a custom domain: <a href="https://help.github.com/articles/setting-up-a-custom-domain-with-pages" rel="nofollow">https://help.github.com/articles/setting-up-a-custom-domain-...</a>
评论 #4880670 未加载
评论 #4883169 未加载
nodrewover 12 years ago
You can also create a static file blog with Jekyll <a href="https://github.com/mojombo/jekyll" rel="nofollow">https://github.com/mojombo/jekyll</a>.<p>Pretty awesome and simple.
nachteiligover 12 years ago
Does one have to make the _yourusername_.github.com repo first for this to work? My understanding is that the Pages feature is only activated by doing this.