Skip to content

Conversation

@tcmetzger
Copy link
Contributor

As discussed in bokeh/bokeh#10971, I have been experimenting with adding favicons (beyond the standard sphinx options).

@choldgraf
Copy link
Collaborator

I think this is a great idea - please ping when it’s ready for a look over!

@tcmetzger
Copy link
Contributor Author

@choldgraf I'd certainly appreciate some feedback at this point - I haven't written any tests yet, but I'd like to make sure this is headed in the right direction!

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good!

@tcmetzger tcmetzger changed the title WIP: Add favicon option and docs Add favicon option and docs Mar 31, 2021
@choldgraf
Copy link
Collaborator

I think the implementation looks great as well. My one thought is that this would be a useful extension to live outside of this theme, so that other people could use it as well.

I think of this as similar to the sphinext-opengraph extension which adds metadata to <head>. See here for where that happens.

I know that creating a sphinx extension is extra work, but I think this could have broader use from the community. Any interest?

@tcmetzger
Copy link
Contributor Author

We are using sphinext-opengraph for Bokeh (and I have even contributed to the repo myself). That is a great idea and I'd love to do that, but I won't have the time to get that going in the next few weeks. We would like to use the favicon feature for Bokeh, so it would be great if we could keep it simple for now and just have this as a feature in the theme. But I'll plan on turning this into a dedicated extension and ping you once it is ready!

@choldgraf
Copy link
Collaborator

choldgraf commented Apr 1, 2021

@tcmetzger do I have your permission to make a little Sphinx extension that does this and push it to PyPI by tomorrow? :-)

I'd put it in the executablebooks/ repository and list you as an author for stuff (or if you like, we can just list executablebooks/ as the author)

otherwise, I'm fine just merging this in here, though FWIW I think that it'll be a faster road to PyPI if we publish it as a lightweight extension, than if we wait for the pydata theme to make another release 🙃

@tcmetzger
Copy link
Contributor Author

@choldgraf Sure, that is no doubt the quickest solution. I'd appreciate it if you could list me as an author!

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Apr 1, 2021

or upstream to sphinx .. ;)

(but of course that's only for the long term)

@choldgraf
Copy link
Collaborator

@jorisvandenbossche that's a good point - let's just get this one in here quickly and open an issue in Sphinx to see if they'd be interested in it. I think html_favicon could basically be the data structure proposed here as well.

@tcmetzger wanna add a quick test to make sure the functionality works? Other than that LGTM

@tcmetzger
Copy link
Contributor Author

@choldgraf Quick test has been added. Great idea with the Sphinx issue!

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tests!

@jorisvandenbossche jorisvandenbossche changed the title Add favicon option and docs Add favicons option for defining multiple favicons Apr 3, 2021
@jorisvandenbossche jorisvandenbossche merged commit 69bbbec into pydata:master Apr 3, 2021
@jorisvandenbossche
Copy link
Member

There is a sphinx PR that tries to do something similar, but specific for apple: sphinx-doc/sphinx#8249 (might be worth chiming in there, I think the sphinx maintainer already proposed to make it more generic, similar as done here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants