I have set up my professional website/homepage using Github Pages
. I know if this was just HTML
being served up from somewhere, my downloadable file would need to be in the directory of my .html
file, and then I could reference it in the .html
file and link it up. However, since this is served by Github through repository, I am unsure on how to do this.
.html
file?Also, I am aware that the Automatic Page Generator
makes it possible to hardly touch the HTML, but it seems pretty restrictive as far as customizing where links and other content appears on your page...
On GitHub.com, navigate to the main page of the repository. Above the list of files, using the Add file drop-down, click Upload files. Drag and drop the file or folder you'd like to upload to your repository onto the file tree.
To download from GitHub, you should navigate to the top level of the project (SDN in this case) and then a green "Code" download button will be visible on the right. Choose the Download ZIP option from the Code pull-down menu.
You could just link it normally in your html. Commit it to your repository and have users right click to save.
I just tried this on one of my repositories where I put a link to my CSS file.
<a href="css/style.css">style.css</a>
I was able to right click the link and download the file. If you wanted to create a download from the root you would do:
<a href="file.txt">Download File</a>
I'm pushing my repositories manually instead of using the Automatic Page Generator. The steps are pretty straight forward Creating Project Pages Manually - GitHub Help
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With