Luke Collins
Luke Collins

Reputation: 1463

Download Buttons for Github Pages

When selecting the theme for the github page of an existing repository, you can see this set of buttons (in the Minimal theme, for example): enter image description here

But when I visit my github pages site, the buttons are not there; all I can see is my readme.md for the repository, and the View the Project on GitHub link. Is there a way to get these buttons on my page?

Upvotes: 13

Views: 6640

Answers (2)

deadlydog
deadlydog

Reputation: 24434

This question is a little old, but I had the same problem and the chosen answer didn't help me out. I found this answer on another SO question. Basically it says your options are:

  • Add links to the downloads at the top of your README.md. The zip link is (https://github.com/parsiad/mlinterp/archive/v0.1.zip) and the tar ball link is (https://github.com/parsiad/mlinterp/archive/v0.1.tar.gz). You can create links in Markdown easily; instructions for links can be found here. Once the links are added to your README.md, they will appear on your auto-generated site.
  • Change your theme to something like Modernist that comes with the download links by default.
  • Instead of automatically generating your GitHub Pages site, pull it into your repository and modify it yourself. You would then be able to add a link to the top of your theme next to the one that is already there.

Update

I never noticed that enabling GitHub Pages on the GitHub repository automatically added the _config.yml file to the repository, so once I pulled the latest changes from the remote repository I saw the file and was able to simply add show_downloads: true to it as Abdul Hadi's answer suggests. I'm leaving the above suggestions in this answer though, as they are still applicable if you are trying to have the download links show in a theme that does not natively support them.

Upvotes: 0

Abdul Hadi
Abdul Hadi

Reputation: 1228

Just add show_downloads: true to your _config.yml

Upvotes: 21

Related Questions