A tutorial/example on how to use GitHub pages to host python notebook files as web pages. Please see here for the full document (which was made as an .ipynb file!).
-
Make an R Markdown file you're proud of and want to share with the world!
-
Export the notebook to html
-
Name the html document
index.html
-
Get the
index.html
file into your GitHub repo- Long term I recommend to find a Git+GitHub tutorial and learn how to interact with git. It's such a useful skill for so many different things!
- Short-term you can use the Add file button followed by clicking Upload files
-
Turn on GitHub pages for the repo by clicking:
- Settings
- Pages (under the Code and automation section in the sidebar)
- Find the dropdown menu in the Branch section of the page and select "main" (there's a chance you want to select "master")
- If you're new to GitHub there's probably only one option to choose, choose that one option that's not "None"
- Click the Save button
-
Wait!
-
Find your website online at:
https://<your-username>.github.io/<your-repo-name/
- For example this repo is at https://github.com/AdamSpannbauer/hosting-ipynbs-with-GitHub-Pages/
- This shows my user name is
AdamSpannbauer
- This shows my repo name is
hosting-ipynbs-with-GitHub-Pages
- This shows my user name is
- It's published GitHub pages site can is https://adamspannbauer.github.io/hosting-ipynbs-with-GitHub-Pages/
- For example this repo is at https://github.com/AdamSpannbauer/hosting-ipynbs-with-GitHub-Pages/