

How to host and manage static sites (of unlimited size) for free on Github - maxogden
https://github.com/maxogden/gh-pages-template

======
kecebongsoft
I had a problem with Github user pages for the past few months: It stopped
building.

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.

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.

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.

~~~
pyre
I put up a static page a couple of weeks ago with no issue. Granted, I'm not
using Jekyll and just generating the static files on my own locally before
committing / pushing.

~~~
kecebongsoft
I'm using Pelican as a static blog engine, had no issue at first, this
happened after the number of commit grow.

------
nthitz
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.

~~~
activepeanut
Yeah, this is ripe for abuse by pornographers. :(

~~~
nthitz
Really? Care to expand? That just surprises me!

~~~
apricot13
I'd imagine the bandwidth for a porn site is huge, imagine having all that
bandwidth dealt with by someone else for free! plus the porn industry tends to
get in on new technologies early so Id be surprised if there isn't some
somewhere.

Unrelated to porn this sort of thing could be great in general as all the
content is searchable it would be a goldmine for information on how to use a
function or do some specific action. I already use git as a codex of sorts!

------
hunvreus
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.

Be careful though, __if you push something on gh-pages it will be public, even
if your repo is private __.

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
Github pages is a fantastic service. I use it as an automatic archive for a
daily mailing list: <https://github.com/simon-weber/the-listserve-archive>.

Basically, Github is my free host, database and api.

------
reidrac
OT, but I'd love to know what HN think about this:

The license part of the README.md says "The content in this repo is BSD
licensed".

AFAIK licensing requires:

\- A copyright line with the year (or years) and the name of the copyright
holder.

\- IIRC a way to contact the copyright holder is required (email, URL, etc),
but I may be wrong and it's just optional.

\- 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.

In this case, does the "The content in this repo is BSD licensed" sentence
have any kind of effect?

EDIT: ate a word, formatting

~~~
advisedwang
(IANAL, most familiar with UK rules)

Generally a author has copyright over their works without having to explicitly
says so. Saying "Copyright (c) YYYY AUTHOR NAME" is just a way of asserting it
to remove potential confusion or ambiguity.

With no licensing, there is no right to use a copyright work (except fair
use). BSD licensing a work is _granting_ permission is a set of circumstances,
not revoking permission. Thus if a license is not correctly applied the work
cannot be used, rather than the inverse.

As for "The content in this repo is BSD licensed" - the usual licensing
wording is again a convention designed to be as clear as possible, but the
wording applied there probably counts as it pretty clearly intends to give
permission. The "probably" is why people ought to stick to known and
understood conventions.

------
nnq
...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 ask all web
developers out there to not use Github pages for clients' websites_ , 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
_your_ website/blog, _you family's_ , _your pet's_ , but _not for your
clients'_ , please...

~~~
jwdunne
A lot of clients are actually willing to pay for you to host their site, just
as long as they don't have to do anything technical. We're talking £350 for a
year in a lot of cases and the site could simply be an addon domain on a
package with a few sites on it. This also includes a walk through of setting
up emails on Outlook, iPhone or what have you.

They just don't care because you end up doing something that takes you 5
minutes and little to no energy which would be next to impossible for them.

Since the margins are so high, you also have freedom to make nice discounts
without a loss.

------
nvr219
I miss Geocities

~~~
simonsarris
You know what? Me too. I miss Geocities and I never realized until just now.

That was a great internet. The people's internet. I was 13 years old but I was
allowed to make a website for free, with no help or direction from parents or
teachers or anyone, with barely anything to learn.

And when I was done it was _there._ It was a thing I made on the internet and
I could show anyone. And I did, and it was probably embarrassingly bad, but
that's not the point.

I think more than anything in my career, services like Geocities inspired me.

 _See the internet? You can make it. You can do this stuff. It's not that
hard._

Nobody else in my life told me that. Nobody explained to me that creating
things on a computer _wasn't magic_ , and if I wasn't enticed with such an
easy website creator I may have never known.

What do I give my kids? What do I give my little cousins, right now, at the
age of 10, that even comes close?

\---

Looking around there seem to be a few, but they're all so template-centric
that I wonder if I'd feel the same way if I had them back then.

~~~
oceanic
I wish I could upvote this comment more than once.

I remember getting on Geocities in 1996 and finding a burgeoning community,
full of randomness and fun, all learning as we went along about how build
websites. I remember mine was in the “Bourbon Street” “neighbourhood”.

I had a lot of fun that year, messing about on IRC, learning HTML, building
(ugly :-) websites, helping others do the same. Can't believe I sound
nostalgic about that place.

I think I'll set up my daughter (nearly 9, already has her own domain) with a
GitHub account, and set up Pages so she can play with HTML, CSS and stuff.

~~~
nvr219
Same here. I remember in '97 my grandma bought me a Geocities "plus" (or
whatever it was called) account so I could have a geocities.com/~username
vanity address. All my real life nerd friends were so jealous of me. :-)

Having free home pages on Geocities did a lot for my career. What will my son
gain from whatever "social" web site is around when he starts using a computer
(and yeah he also already has his own domain name)?

------
aGHz
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.

[1] <http://news.ycombinator.com/item?id=4857473>

------
jimmytttt
_What it isn't: a dynamic host -- so it can't do PHP/Rails/Node etc._

Seems like a good opportunity for sever-less folks like WebScript.io or
Firebase to jump in and help.

------
redidas
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.

Oddly enough, I don't see any mention of this in the github article explaining
how to set up a custom domain: [https://help.github.com/articles/setting-up-a-
custom-domain-...](https://help.github.com/articles/setting-up-a-custom-
domain-with-pages)

~~~
pearkes
In the root of your repo on the gh-pages branch:

echo example.com > CNAME

Then point it (if apex) at 207.97.227.245.

------
nodrew
You can also create a static file blog with Jekyll
<https://github.com/mojombo/jekyll>.

Pretty awesome and simple.

------
nachteilig
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.

