sphinx-doc / alabaster

Lightweight, configurable Sphinx theme
http://alabaster.readthedocs.io/
Other
737 stars 189 forks source link

forkme image working #208

Closed jbloom closed 10 months ago

jbloom commented 1 year ago

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.

alexdlaird commented 1 year ago

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 %}
Michael-E-Rose commented 1 year ago

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.

alexdlaird commented 1 year 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.

jbloom commented 1 year ago

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

Michael-E-Rose commented 1 year ago

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

jbloom commented 1 year ago

I opened #211 to fix this.

Hopefully they will merge it soon!