Download Buttons for Github Pages

一曲冷凌霜 提交于 2020-06-11 21:29:59

问题


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):

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?


回答1:


Just add show_downloads: true to your _config.yml




回答2:


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.




回答3:


You should install the your project according to the delegation. You can get help via youtube video https://www.youtube.com/watch?v=tRTckrrCME4



来源:https://stackoverflow.com/questions/43970134/download-buttons-for-github-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!