Displaying HTML Files in GitHub
This article is originally published at https://www.finex.co
Setting up an HTML page in GitHub is not difficult but it is a bit lengthy. Just follow these steps.
- Create the HTML from your RMarkdown document and save to your local directory.
- Create a new repo, or go to an existing repo, in your GitHub.
- In the repo, create a new file called
- In the
index.htmlfile, type this code:
- Commit the file.
- In the repo, click on the Settings tab.
- Scroll down to GitHub Pages Section.
- Under “Source”, choose “master branch/docs folder” and save. If that doesn’t work, try the “master branch” and save.
- A message will appear that your site is read to be published. Click on the link.
- When Git finds the
index.htmlfile in a
docs/folder, it creates a web address for the contents. The address takes the form:
- Go to that address. You should see your “Hello World” greeting. That is your
- Go back to the
docs/folder and open it.
- Upload the HTML file you created in RMarkdown and commit.
- Return to your github.io site but add the HTML file name to the address:
- You should find your HTML posted there.
Please visit source website for post related comments.