Hacker News new | ask | show | jobs
by codazoda 3387 days ago
I use GitHub. I'm a developer, so maybe this is hard... They let you use their website to create a repo, add a file, and then in the settings specify that master is the source branch for GhPages so that it's available via the browser to the world at yourname.github.io/yourproject. You can even add a custom domain if you want.
2 comments

Here are the quick steps to do this.

Visit github.com

Create an account or login

Click the green "New repository" button

Give your website a name like "hello"

Check the box to Initialize this repository with a README

Click the Create repository button

Click the Create new file button

Name the file index.html

Enter <p>Hello World</p> in the body of the file

Click the Commit new file button

Click the Settings gear icon

Scroll down to GitHub Pages

Select master branch under Source

Click the Save button

There's now a link to username.github.io/hello under the GitHub Pages heading. You can now edit the index.html file or add css and js resources in the same way you just added the index file. Uploading files, such as images, is also supported. All without using Git.

Great start :)

You can also drag and drop files from your desktop to your repo.

Awesome, thanks for this!
is github pages limited to jekyll? Or can you host any kind of html page? I thought about it as well but it adds a lot of complexity. Git is not easy to learn.

Oh wait, you're saying that you can do everything without using Git? That sounds good then.

You can host any kind of HTML. Jekyll is just there so you can check in Markdown and config and GitHub will generate the HTML for you whenever you commit. But it doesn't have to work that way. Plenty of static site generators also support GitHub Pages as a hosting method.