-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Feature Request]Add Switch of "View on github" #61
Comments
Id like that feature too! You can do this yourself btw by adding:
to /assets/css/style.scss That will hide the View on Github button :) |
@Ak-wa Yeah, it works, but doesn't exactly meet my demands. TBH, I already changed the |
Hi @chenrylee Your proupose is interesting. For backwards compatibility and taking a view on other themes it should be {% _show_repository_url = site.show_repository_url | default: true %}
{% if _show_repository_url and site.github.is_project_page %}
<a href="{{ site.github.repository_url }}" class="btn btn-github"><span class="icon"></span>View on GitHub</a>
{% endif %} Also control other flags to remove the section container when apply. Lines 21 to 27 in 7b7303a
So the entire snippet takes this look more or less: {% _show_repo_url = site.show_repository_url | default: true %}
{% if site.show_downloads or site.github.is_project_page and _show_repo_url %}
<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 %}
{% if site.github.is_project_page and _show_repo_url %}
<a href="{{ site.github.repository_url }}" class="btn btn-github"><span class="icon"></span>View on GitHub</a>
{% endif %}
</section>
{% endif %} The tasks to resolve in PR should be the following:
|
Hey @davorpa, your approach seems great 👍 Any ETA to merge this? |
Sorry @pil0u I forgot completely this request. I had forked the repo but I'm not be able to install a ruby environment locally to test it. 🤦 💬 It will be a good option use the properties of github pluging (variable You can see the result in my previous post |
My first feeling is that the more customizable, the better. But as you mentioned all these issues, the real issue here is definitely to be able to get rid the button, so I'd say choose what's the fastest 😄 |
One or another, values provided by plugins can always be overriden in github:
is_project_page: false The authentic flexibility goes by the hands on
B.R. |
Absolutely, that's what I meant, just pick one. |
Just noticed this section in the README. That's what I ended up doing by totally removing the line in the layout 👍 |
Implements pages-themes#61 using github config metadata gem
@pil0u @chenrylee implemented as easy as posible and compatible with other themes I hope mantainers accepts the pull request #81 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is it possible to add a switch to control if button
View on github
is displayed?/_layouts/default.html line26:
Change to:
The text was updated successfully, but these errors were encountered: