I have some screenshots of an application that I want to put in my github repository’s
README. Fortunately, github provides a feature that can be used to solve this problem, called github pages.
Github’s pages service provides a lot of useful resources for hosting a website about your project. However, if you’re just looking to host static content (such as images), pages will do the trick. Below, I’ll show how to host content on github pages in a couple of minutes.
- Create a new, empty branch called
- Add your static files
images/folder in the root of the branch, and put your screenshots in that folder.
- Commit and push
gh-pagesbranch to github
- Switch back to your
- Link to your images in your markdown file
If you need to add new pictures to your repository, just switch to your
gh-pages branch and push any other resources you need, then link to them in your README.