How To Publish Your HTML With Github Pages

Hi! In this story we are going to learn how to publish our HTML files with Github Pages.

With Github Pages you can host your static web pages with minimum effort. We can store our files at the repository of our page and with specific URL, anyone can view your project website. You can visit the webpage of Github Pages for detailed information. You can do much more with Github Pages but in this story we will show how to publish basic HTML, you can make this story as a starting point to continue with your project or personel page.

Let’s start. First of all you need to create new repository for this.

We need to create a repository named “username.github.io”, but you need to change “username” with your username. In my case that will be “anilemrah.github.io”. Let’s create your repository.

After created your repository, let’s add our .html file as index.html. We are adding index.html because github renders index.html first.

After adding index.html, write your commit message and click the “Commit Changes” button.

Let’s check the file to be sure that we have uploaded the index.html file.

After that click the “settings” of the repository.

Scroll down and find the GitHub Pages section. You can create custom domain or choose a theme for your webpage. But as we see our index.html already published at https://anilemrah.github.io. I have exported plotly graph to HTML and put it as an index.html, so that is what you see on that page. (In the future that can be change but nevermind) But you can always create custom HTMLs and also support that with .css files to create perfect websites also you can use themes from Github pages.

Congrats! We have built a basic static webpage for our profile.

That’s all for now. I hope that article will help you, if you have any questions or suggestions please leave me a comment. Thank you for your time. Hope to see you in next articles!

Full-time developer, and lifelong learner. Loves to learn and experience. Motto: Stay Hungry, Stay Foolish | @anilemrah_

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store