How do I change the download button path and text in Github Pages theme?

Viewed 101

I have been trying how to change the download button path so it doesn't download the gh-pages branch. I would also like to know how I can change the text displayed on these also. I have been scouring the internet to see if I can find a way that works for me.

I am also using the Architect theme if that helps

config.yml:

theme: jekyll-theme-architect
show_downloads: true

enter image description here

2 Answers

You have a similar issue in pages-themes/architect issue 40 which points out to:

_layouts/default.html

<a href="{{ site.github.owner_url }}" class="button"><small>Follow me on</small> GitHub</a> 

_sass/jekyll-theme-architect.scss

 header a.button { 
   position: absolute; 
   top: 0; 
   right: 0; 
   background: transparent url(../images/github-button.png) 0 0 no-repeat; 
 }

Check in your own theme source if you have a similar resource declaration, for you to change.

<aside id="sidebar">
      {% if site.show_downloads %}
        <a href="{{ site.github.zip_url }}" class="button">
          <small>Download</small>
          .zip file
        </a>
        <a href="{{ site.github.tar_url }}" class="button">
          <small>Download</small>
          .tar.gz file
        </a>
      {% endif %}

looking at the above from the theme's default.html file, you will need to go to your _config.yml and add the links to the zip and tar files you want to be downloaded when the buttons are clicked. These can be added like this:

 show_downloads: true 
    github:  
      zip_url: << add zip url here >>
      tar_url: << add tar url here >>

About changing the button text, am not very sure how you can go about it.

Related