Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make 'fork me' and repo url optional. #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Additionally, you may choose to set the following optional variables:
```yml
show_downloads: ["true" or "false" (unquoted) to indicate whether to provide a download URL]
google_analytics: [Your Google Analytics tracking ID]
show_forkme: ["true" or "false" (unquoted) to indicate whether to show the "Fork Me" ribbon in the top corner]
show_repo: ["true" or "false" (unquoted) to indicate whether show the link to the github repository in the footer]
```

### Stylesheet
Expand Down
4 changes: 3 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
title: Merlot theme
description: Merlot is a theme for GitHub Pages.
show_downloads: true
show_forkme: true
show_repo: true
google_analytics:
theme: jekyll-theme-merlot
theme: jekyll-theme-merlot
19 changes: 13 additions & 6 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
</head>

<body>
<a id="forkme_banner" href="{{ site.github.repository_url }}">View on GitHub</a>
{% if site.show_forkme %}
<a id="forkme_banner" href="{{ site.github.repository_url }}">View on GitHub</a>
{% endif %}

<div class="shell">

<header>
Expand Down Expand Up @@ -62,11 +65,15 @@ <h2>{{ site.description | default: site.github.project_tagline }}</h2>
<footer>
<span class="ribbon-outer">
<span class="ribbon-inner">
{% if site.github.is_project_page %}
<p>this project by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a> can be found on <a href="{{ site.github.repository_url }}">GitHub</a></p>
{% endif %}
{% if site.github.is_user_page %}
<p>Projects by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a> can be found on <a href="{{ site.github.repository_url }}">GitHub</a></p>
{% if site.show_repo %}
{% if site.github.is_project_page %}
<p>this project by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a> can be found on <a href="{{ site.github.repository_url }}">GitHub</a></p>
{% endif %}
{% if site.github.is_user_page %}
<p>Projects by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a> can be found on <a href="{{ site.github.repository_url }}">GitHub</a></p>
{% endif %}
{% else %}
<p>&nbsp;</p>
{% endif %}
</span>
<span class="left-tail"></span>
Expand Down