Skip to content

Commit

Permalink
Supports switch on "view on github" link
Browse files Browse the repository at this point in the history
Implements pages-themes#61 using github config metadata gem
  • Loading branch information
davorpa authored Aug 8, 2021
1 parent 4c94250 commit 3e9b87e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ <h1>{{ site.title | default: site.github.repository_name }}</h1>
</a>
<h2>{{ site.description | default: site.github.project_tagline }}</h2>

{% if site.show_downloads or site.github.is_project_page %}

This comment has been minimized.

Copy link
@davorpa

davorpa Aug 8, 2021

Author Owner

Hide entire section if both flags are truth

<section id="downloads">
{% if site.show_downloads %}
<a href="{{ site.github.zip_url }}" class="btn">Download as .zip</a>
<a href="{{ site.github.tar_url }}" class="btn">Download as .tar.gz</a>
{% endif %}
<a href="{{ site.github.repository_url }}" class="btn btn-github"><span class="icon"></span>View on GitHub</a>
{% if site.github.is_project_page %}<a href="{{ site.github.repository_url }}" class="btn btn-github"><span class="icon"></span>View on GitHub</a>{% endif %}

This comment has been minimized.

Copy link
@davorpa

davorpa Aug 8, 2021

Author Owner

Using github config metadata gem

</section>
{% endif %}
</div>
</header>

Expand Down

0 comments on commit 3e9b87e

Please sign in to comment.