Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 2

How to access zip_url of master branch from site.github metadata?

When a Github page is created in `gh-pages` branch I can have a download link to the zip/tar of the `gh-pages` branch, with `site.github.zip_url`. But I want a link to the `master` branch rather than the `gh-pages` branch. Besides writing down the url explicitly, is there anyway to access it from the `site.github` metadata?

1 Reply
Community Manager
Message 2 of 2

Re: How to access zip_url of master branch from site.github metadata?

As far as I know, that information isn't available in the `site.github` Jekyll metadata. It's pretty easy to calculate though, given the URL of the repository itself. If the URL of the GitHub repository is https://github.com/Octocat/Spoon-Knife, then the Zip URL for the `master` branch is https://github.com/Octocat/Spoon-Knife/archive/master.zip

 

I hope that helps!