sphinx-doc / alabaster

Lightweight, configurable Sphinx theme

Home Page:http://alabaster.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

forkme image working

jbloom opened this issue · comments

The github_banner option links to the following image: https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png

However, no such image exists on S3 anymore, so no image shows up and the page looks wrong.

GitHub moved their images to this URL instead: But GitHub actually serves up these images themselves, point to this URL instead: https://github.blog/wp-content/uploads/2008/12/forkme_right_darkblue_121621.png.

Since they don't seem to be making / merging updates to this theme, here's how I fixed this. In your config, disable Alabaster from rendering this:

html_theme_options = {
    "github_banner": False,
}

Then render it yourself, extend layout.html:

{% block footer %}
    {{ super() }}
    <a href="https://github.com/{{ theme_github_user }}/{{ theme_github_repo }}" class="github">
        <img style="position: absolute; top: 0; right: 0; border: 0;" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_darkblue_121621.png?resize=149%2C149" alt="Fork me on GitHub" alt="Fork me on GitHub" class="github">
    </a>
{% endblock %}

Thanks for the workaround!

But how do you know they don't accept changes? The last PR https://github.com/sphinx-doc/alabaster/pulls?q=is%3Apr+is%3Aclosed was merged 2 weeks ago.

That was an assumption on my part after looking at various issues / PRs with no response on them, but perhaps they do! Would be great if they merged a fix for this, since it's relatively simple.

Has anyone actually opened a pull request for this, or should I?

Looks like a "no" so far. Go for it, I will be forever grateful :)

I opened #211 to fix this.

Hopefully they will merge it soon!