TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

90 点作者 maxogden超过 12 年前

12 条评论

kecebongsoft超过 12 年前
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 未加载
nthitz超过 12 年前
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 未加载
hunvreus超过 12 年前
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_weber超过 12 年前
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.
reidrac超过 12 年前
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 未加载
nnq超过 12 年前
...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 未加载
nvr219超过 12 年前
I miss Geocities
评论 #4880136 未加载
评论 #4880969 未加载
aGHz超过 12 年前
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>
jimmytttt超过 12 年前
<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 未加载
redidas超过 12 年前
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 未加载
nodrew超过 12 年前
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.
nachteilig超过 12 年前
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.